views:

43

answers:

2

If I create SQS queue from an EC2 instance without specifying the region in the API call, in which region will the queue be created.

When I run

boto.sqs.regions()

I get 4 regions from an NON ec2 machine, I get

[RegionInfo:us-east-1, RegionInfo:eu-west-1, RegionInfo:us-west-1, RegionInfo:ap-southeast-1]

from a EC2 machine in the Asia Pacific Region I get

[RegionInfo:us-east-1, RegionInfo:eu-west-1, RegionInfo:us-west-1]

Does Amazon set region of SQS based on the EC2 instance region. Is there a way to access other region Queues?

I am using the python Boto library.

A: 

Is there a way to access other region Queues?

No matter where you create a SQS queue, you can access it from anywhere. We create the queue in US EAST, but have machinens in EU and ASIA reading data from that queue.

The only difference is the traffic price:

Data transferred between Amazon SQS and Amazon EC2 within a single region is free of charge. Data transferred between Amazon SQS and Amazon EC2 in different regions will be charged at the normal data transfer rate.

Ruby8848
But I am not able to set the region to the current SQS region in EC2 using Boto Python library. So should I assume it is taking the current region in use as the default region.
sheki
the above was an issue with the version of the library.
sheki
+1  A: 

In the boto library, you have to specify which region to connect to or else it defaults to US-EAST region. The old version of boto python library (1.9) did not have the Southeast Asia region and hence the above problem.

sheki