Skip to content

Configure the AWS Client

Pablo Cantero edited this page Jun 27, 2017 · 4 revisions

There are a few ways to configure the AWS client:

  • Ensure the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env vars are set.
  • Create a ~/.aws/credentials file.
  • Set Aws.config[:credentials] or Shoryuken.sqs_client = Aws::SQS::Client.new(...) from Ruby code (e.g. in a Rails initializer)
  • Use the Instance Profiles feature. The IAM role of the targeted machine must have an adequate SQS Policy.

You can read about these in more detail here.

SQS client

If you need to change specific SQS client options, such as wait_time_seconds (SQS Long Polling), you can do it through an initializer as follows:

Shoryuken.sqs_client_receive_message_opts = {
  wait_time_seconds: ...
}

Clone this wiki locally