{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/917","repository_url":"https://api.github.com/repos/serverless/serverless","labels_url":"https://api.github.com/repos/serverless/serverless/issues/917/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/917/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/917/events","html_url":"https://github.com/serverless/serverless/pull/917","id":144616323,"number":917,"title":"Add support for assuming a role like AWS CLI","user":{"login":"stevecaldwell77","id":479049,"avatar_url":"https://avatars.githubusercontent.com/u/479049?v=3","gravatar_id":"","url":"https://api.github.com/users/stevecaldwell77","html_url":"https://github.com/stevecaldwell77","followers_url":"https://api.github.com/users/stevecaldwell77/followers","following_url":"https://api.github.com/users/stevecaldwell77/following{/other_user}","gists_url":"https://api.github.com/users/stevecaldwell77/gists{/gist_id}","starred_url":"https://api.github.com/users/stevecaldwell77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevecaldwell77/subscriptions","organizations_url":"https://api.github.com/users/stevecaldwell77/orgs","repos_url":"https://api.github.com/users/stevecaldwell77/repos","events_url":"https://api.github.com/users/stevecaldwell77/events{/privacy}","received_events_url":"https://api.github.com/users/stevecaldwell77/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-30T14:48:28Z","updated_at":"2016-04-02T01:20:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/serverless/serverless/pulls/917","html_url":"https://github.com/serverless/serverless/pull/917","diff_url":"https://github.com/serverless/serverless/pull/917.diff","patch_url":"https://github.com/serverless/serverless/pull/917.patch"},"body":"The AWS CLI allows you to have a profile that assumes a role when invoking commands, via a separate profile that you have configured:\r\n\r\n  http://docs.aws.amazon.com/cli/latest/userguide/cli-roles.html\r\n\r\ne.g. I might have an ~/aws/credentials file that looks like:\r\n\r\n```\r\n[bob]\r\naws_access_key_id=XXXXXXX\r\naws_secret_access_key=XXXXX\r\n```\r\n\r\nand an ~/.aws/config file that looks like:\r\n```\r\n...\r\n[profile bob]\r\nregion = us-east-1\r\n\r\n[profile client_project_a]\r\nrole_arn = arn:aws:iam::012345678901:role/admin\r\nsource_profile=bob\r\n\r\n[profile client_project_b]\r\nrole_arn = arn:aws:iam::012345678901:role/admin\r\nsource_profile=bob\r\n```\r\n\r\nThis pull request adds support to serverless to make the necessary STS calls when the specified profile is a \"role profile\".\r\n\r\nIt also modified the credentials lookup so that it pays attention to the AWS_SHARED_CREDENTIALS_FILE and AWS_CONFIG_FILE environment variables, as specified here:\r\n\r\nhttp://docs.aws.amazon.com/cli/latest/topic/config-vars.html"},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/204623345","html_url":"https://github.com/serverless/serverless/pull/917#issuecomment-204623345","issue_url":"https://api.github.com/repos/serverless/serverless/issues/917","id":204623345,"user":{"login":"stevecaldwell77","id":479049,"avatar_url":"https://avatars.githubusercontent.com/u/479049?v=3","gravatar_id":"","url":"https://api.github.com/users/stevecaldwell77","html_url":"https://github.com/stevecaldwell77","followers_url":"https://api.github.com/users/stevecaldwell77/followers","following_url":"https://api.github.com/users/stevecaldwell77/following{/other_user}","gists_url":"https://api.github.com/users/stevecaldwell77/gists{/gist_id}","starred_url":"https://api.github.com/users/stevecaldwell77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevecaldwell77/subscriptions","organizations_url":"https://api.github.com/users/stevecaldwell77/orgs","repos_url":"https://api.github.com/users/stevecaldwell77/repos","events_url":"https://api.github.com/users/stevecaldwell77/events{/privacy}","received_events_url":"https://api.github.com/users/stevecaldwell77/received_events","type":"User","site_admin":false},"created_at":"2016-04-02T01:20:57Z","updated_at":"2016-04-02T01:20:57Z","body":"@erikerikson - thanks so much for the feedback!  I've updated the code to take in all your suggestions."}}