This question is related to IAM Role Name considred as Class in Yii 1
As mentioned in the answer there, I unregistered and re-registered YII's autoloader before making any AWS call. And that is removing my issue of failed to open stream: No such file or directory
. But writing this same piece of code everywhere I'm making any call to AWS does not seem logical to me.
What are the alternatives to this solution?