{"action":"created","issue":{"url":"https://api.github.com/repos/phstc/shoryuken/issues/204","repository_url":"https://api.github.com/repos/phstc/shoryuken","labels_url":"https://api.github.com/repos/phstc/shoryuken/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/phstc/shoryuken/issues/204/comments","events_url":"https://api.github.com/repos/phstc/shoryuken/issues/204/events","html_url":"https://github.com/phstc/shoryuken/pull/204","id":153042270,"number":204,"title":"Allow Shoryuken AWS credentials to be overridden for job enqueuing","user":{"login":"gtaschuk","id":1857611,"avatar_url":"https://avatars.githubusercontent.com/u/1857611?v=3","gravatar_id":"","url":"https://api.github.com/users/gtaschuk","html_url":"https://github.com/gtaschuk","followers_url":"https://api.github.com/users/gtaschuk/followers","following_url":"https://api.github.com/users/gtaschuk/following{/other_user}","gists_url":"https://api.github.com/users/gtaschuk/gists{/gist_id}","starred_url":"https://api.github.com/users/gtaschuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtaschuk/subscriptions","organizations_url":"https://api.github.com/users/gtaschuk/orgs","repos_url":"https://api.github.com/users/gtaschuk/repos","events_url":"https://api.github.com/users/gtaschuk/events{/privacy}","received_events_url":"https://api.github.com/users/gtaschuk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-05-04T15:31:44Z","updated_at":"2016-09-02T19:47:41Z","closed_at":"2016-09-02T19:47:41Z","pull_request":{"url":"https://api.github.com/repos/phstc/shoryuken/pulls/204","html_url":"https://github.com/phstc/shoryuken/pull/204","diff_url":"https://github.com/phstc/shoryuken/pull/204.diff","patch_url":"https://github.com/phstc/shoryuken/pull/204.patch"},"body":"We use more than one set of keys for Aws.  While ```config/shoryuken.yml``` works well for initializing workers to use alternate Aws credentials, in order to enqueue jobs correctly from the web worker, we needed to override the credentials that ```Aws::SQS::Client``` uses.\r\n\r\nThis allows us to specify in ```config/initializers/shoryuken.rb```\r\n```ruby\r\nShoryuken.options[:aws] = { \r\n  access_key_id: ENV['AWS_API_ACCESS_KEY_ID'],\r\n  secret_access_key: ENV['AWS_API_SECRET_ACCESS_KEY']\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/phstc/shoryuken/issues/comments/244471159","html_url":"https://github.com/phstc/shoryuken/pull/204#issuecomment-244471159","issue_url":"https://api.github.com/repos/phstc/shoryuken/issues/204","id":244471159,"user":{"login":"phstc","id":105652,"avatar_url":"https://avatars.githubusercontent.com/u/105652?v=3","gravatar_id":"","url":"https://api.github.com/users/phstc","html_url":"https://github.com/phstc","followers_url":"https://api.github.com/users/phstc/followers","following_url":"https://api.github.com/users/phstc/following{/other_user}","gists_url":"https://api.github.com/users/phstc/gists{/gist_id}","starred_url":"https://api.github.com/users/phstc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phstc/subscriptions","organizations_url":"https://api.github.com/users/phstc/orgs","repos_url":"https://api.github.com/users/phstc/repos","events_url":"https://api.github.com/users/phstc/events{/privacy}","received_events_url":"https://api.github.com/users/phstc/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T19:47:41Z","updated_at":"2016-09-02T19:47:41Z","body":"Shoryuken actually sets the [`Aws.config`](https://github.com/phstc/shoryuken/blob/555953fb5e4c37933335109adc1e23d5197c382b/lib/shoryuken/environment_loader.rb#L74). So if you want to change that dynamically at runtime, re-setting it `Aws.config = config` would change the creds."}}
{"actor":{"display_login":"phstc"}}