Take the 2-minute tour ×

The bootstrap script contains

use Aws\Common\Aws;
use Aws\S3\Enum\CannedAcl;
use Aws\S3\Exception\S3Exception;  

I have a function "aws_s3_put_object" with the code

$s3 = Aws::factory('../lib/aws-config.php')->get('s3');

but I get the error

PHP Fatal error:  Class 'Aws' not found

Why is the class "Aws" not accessible in the function ? What am I doing wrong ?

share|improve this question
are you including the Aws autoloader or files needed? –  Luke Feb 18 '13 at 19:47
Yes, I am. When I put the the "use" and the "Aws::factory" in the same php script its working. –  Prakash Raman Feb 18 '13 at 19:49
add comment

Your Answer



Browse other questions tagged or ask your own question.