Amazon SDK

Hi guys, I am testing out the cloud offering from Amazon and want to integrate the SDK from them into my Yii application.

The SDK is located here

The particular item I am testing right now is the AmazonSES offering.

What I have done:

Added the following to my index.php



I have verified that this location is correct and it’s loading from index.php

When I try to make a call to the following I get the error "include(AmazonSES.php): failed to open stream: No such file or directory"

$email = new AmazonSES();

Can someone enlighten me on what I am doing wrong?

Reading a little bit deeper in the tutorials I found this and followed it. I moved the SDK to vendors/amazon

I added the following



It’s still not working properly. Any ideas?

So after fighting with this for an hour or so I have a page working, but is this really how I would have to do this for any function I want to use for AmazonSDK?










    $email = new AmazonSES();

    $response = $email->send_email(

        '', // Source (aka From)

        array('ToAddresses' => ''), // Destination (aka To)

        array( // Message (short form)

            'Subject.Data' => 'Email Test ' . time(),

            'Body.Text.Data' => 'This is a simple test message ' . time()



    // Success?


So after scouring the web and pulling information together from several sites I think I finally have the proper way. Documenting it here in the event someone else needs this

I added the following code in index.php (NOTE: Yii::$classMap between require_once($yii) and Yii::createWebApplication($config)->run())


// Map classes for Amazon Cloud Computing Environment












I then updated ‘import’ in config/main.php to import where I unzipped the SDK for Amazon




All seems to be working fine. Cheers!

Strange but not works for me.

I got:

include(Z:/home/myapp/www/protected/vendors/amazon/services/ses.class.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory 

I have the next in index.php:

$pathToSES = dirname(__FILE__) . '/protected/vendors/amazon/';











and in main.php:





This seems to work for me. At the moment, I don’t think there’s anything else except for these three lines, but it’s been a while since I’ve looked into this old app…


require_once dirname(__FILE__) . "/amazons3/sdk.class.php";

spl_autoload_register(array('YiiBase', 'autoload'));

Hi, I was reading about this to get my SES up and running. It seems that you need to define each and every class used in the class map, as you have done, for future people though, there’s quite a lot that needs to be defined on the newer SDK that isn’t mentioned here. Your best bet is defining the whole SDK in a class map right from the start. It is ugly as hell and I am still hoping for someone to tell me that I’m an idiot and there’s a better way to do it, but for now this topic has some details on using the grep plugin to take some of the pain out of the process (don’t be tempted to use the list supplied by one of the posters, this also has some classes missing).

This worked perfectly for me. Thanks!