Build precise queries to find exactly what you need
Press ESC to close
@owitsystemsteam
Member Since: December 11, 2012
Favorites0
Views
Projects0
Took a little while to get this working cos I'm not a developer.. so here are a few tips to get the SDK working This needs version 1 of the AWS SDK for PHP http://aws.amazon.com/sdkforphp/ As stated, you punch in your AWS credentials into a file called config.inc.php Good idea to test the sdk with the sample script that comes with the SDK called "cli-s3_get_urls_for_uploads.php" If you are behind a proxy, you can specify the proxy in sdk.class.php in the line "public proxy = " eg., public $proxy = "http://username:password@proxy:8080"; Nb. I hit errors with proxies until I found out that proxy support was fixed in a recent commit: https://github.com/amazonwebservices/aws-sdk-for-php/pull/49#commits-pushed-eb922ad The AWS SDK for PHP defaults to the US East Region. (ec2.us-east-1.amazonaws.com) You need to set the region if your instances are in a different region. eg., if you were in Asia Pacific Singapore region.. Add a line after "$ec2 = new AmazonEC2();" $ec2->set_hostname('ec2.ap-southeast-1.amazonaws.com'); For a list of hosts and for the regions, refer to this... http://docs.amazonwebservices.com/general/latest/gr/rande.html#ec2_region
Reviewed 13 years ago