Set the region for AWS SDK for PHP

Primary tabs

If you are using the PHP SDK for AWS, by default, all operations are done on their Virginia data center.

If you want to use a different data center, you must define it with the set_hostname command

$sdb = new AmazonSDB();
$sdb -> set_hostname('sdb.ap-northeast-1.amazonaws.com');

There are two parts to this,

  • The Service (eg SDB, EC2, etc..)
  • The Data Center (eg Tokyo)

Valid Data Centers are

LocationregionPositionCode
TokyoAsia PacificNorth Eastap-northeast-1.amazonaws.com
SingaporeAsia PacificSouth Eastap-southeast-1.amazonaws.com
IrelandEuropeWesteu-west-1.amazonaws.com
VirginiaNorth AmericaEastus-east-1.amazonaws.com
Northern CaliforniaNorth AmericaWestus-west-1.amazonaws.com
OreganNorth AmericaWestus-west-2.amazonaws.com
Sao PauloSouth AmericaEastsa-east-1.amazonaws.com

Be careful with the URLs as they are not always consistant. S3 is done slightly differently for example.

Tags:

Drupal Modules:

Your IP Info

IP Address Locator

Speed Test

Test how fast your Internet connection really is.

DropBox

Use this link to get DropBox http://db.tt/iQHWaaF