|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
This version of the AWS SDK for PHP is deprecated and is only provided to support legacy applications. All new code should use the current version of the SDK at http://aws.amazon.com/sdkforphp/.
AWS Regions allow you to access AWS services that reside physically in a specific geographic region. This is useful both for redundancy and to keep your data and applications running close to where you and your users will access them. To select a particular region, configure the AWS client object with an endpoint that corresponds to that region.
For example, to configure an Amazon EC2 client to connect to the Asia Pacific (Singapore) region, use the following code:
$ec2 = new AmazonEC2(); $ec2->set_hostname('ec2.ap-southeast-1.amazonaws.com'); $response = $ec2->describe_instances();
Be aware that regions are logically isolated from each other, so for example, you won't be able to access US East resources when communicating with the EU West endpoint. If you're code accesses multiple AWS regions, we recommend that you instantiate a specific client for each region.