2014-07-02 94 views

回答

4

SQS documentation for the Ruby SDK的頂部,它說你可以直接在SQS界面上設置配置。這意味着你可以做這樣的事情:

sqs = AWS::SQS.new(:region => 'us-east-1') 
queue = sqs.queues.create("myqueue") 

或者,您可以使用全球AWS.Config,像這樣指定它:

AWS.config(
    :access_key_id => 'YOUR_ACCESS_KEY_ID', 
    :secret_access_key => 'YOUR_SECRET_ACCESS_KEY', 
    :region => 'us-east-1') 

的配置文檔是在這裏:http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/Core/Configuration.html