{"action":"created","comment":{"url":"https://api.github.com/repos/aws/aws-sdk-php/pulls/comments/92893970","pull_request_review_id":13419397,"id":92893970,"diff_hunk":"@@ -77,6 +79,66 @@ been configured with an IAM role.\n For more information, see `IAM Roles for Amazon EC2 <http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html>`_.\n \n \n+.. _ecs_credentials:\n+\n+Using IAM roles for Amazon EC2 Container Service Tasks\n+------------------------------------------------------\n+\n+*With IAM roles for Amazon ECS tasks, you can specify an IAM role that can be\n+used by the containers in a task.* This provides a strategy for managing credentials\n+for your applications to use, similar to the way that Amazon EC2 instance profiles\n+provide credentials to EC2 instances.\n+\n+Instead of creating and distributing your AWS credentials to the containers or\n+using the EC2 instance’s role, you can associate an IAM role with an ECS task definition or\n+``RunTask`` `API <http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-ecs-2014-11-13.html#runtask>`_ operation.\n+\n+.. note::\n+\n+    Instance profile credentials and other temporary credentials generated by\n+    the AWS Security Token Service (AWS STS) are not supported by every\n+    service. Please check if the service you are using supports temporary\n+    credentials by reading `AWS Services that Support AWS STS <http://docs.aws.amazon.com/STS/latest/UsingSTS/UsingTokens.html>`_.\n+\n+For more information, see `IAM Roles for Amazon EC2 Container Service Tasks <http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html>`_.\n+\n+\n+.. _assume_role_credentials:\n+\n+Using Assume Role Credentials\n+-----------------------------\n+\n+Using ``Aws\\Credentials\\AssumeRoleCredentialProvider`` to create credentials by assuming a role,\n+you would need to provide ``'region'`` information, ``'credentials'`` for a ``StsClient`` and\n+``'assume_role_params'`` information. Or you could simply pass in ``'client'`` parameter with a ``StsClient``.\n+\n+For more information regarding ``'assume_role_params'``, see `AssumeRole <http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-sts-2011-06-15.html#assumerole>`_.\n+\n+.. code-block:: php\n+\n+    $assumeRoleCredentials = new AssumeRoleCredentialProvider([\n+        'region' => 'us-west-2',\n+        'credentials' => CredentialProvider::ini(),","path":"docs/guide/credentials.rst","position":56,"original_position":56,"commit_id":"d56369aaf96496cd3676037c7216e020907437e7","original_commit_id":"d56369aaf96496cd3676037c7216e020907437e7","user":{"login":"mtdowling","id":190930,"avatar_url":"https://avatars.githubusercontent.com/u/190930?v=3","gravatar_id":"","url":"https://api.github.com/users/mtdowling","html_url":"https://github.com/mtdowling","followers_url":"https://api.github.com/users/mtdowling/followers","following_url":"https://api.github.com/users/mtdowling/following{/other_user}","gists_url":"https://api.github.com/users/mtdowling/gists{/gist_id}","starred_url":"https://api.github.com/users/mtdowling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtdowling/subscriptions","organizations_url":"https://api.github.com/users/mtdowling/orgs","repos_url":"https://api.github.com/users/mtdowling/repos","events_url":"https://api.github.com/users/mtdowling/events{/privacy}","received_events_url":"https://api.github.com/users/mtdowling/received_events","type":"User","site_admin":false},"body":"I'm weary of supporting this use case. In order to do this, we'd need to create an STS client on the developer's behalf, correct? Which means we'd need to hardcode a dependency on the \"latest\" version of STS, correct? That would be a risky contract considering STS could ship a major version at some point that could break this credential provider. Are we doing anything to mitigate this? If not, how you feel about requiring a client be passed in and removing the 'credentials' + 'region' option?","created_at":"2016-12-16T22:02:36Z","updated_at":"2016-12-16T22:02:36Z","html_url":"https://github.com/aws/aws-sdk-php/pull/1137#discussion_r92893970","pull_request_url":"https://api.github.com/repos/aws/aws-sdk-php/pulls/1137","_links":{"self":{"href":"https://api.github.com/repos/aws/aws-sdk-php/pulls/comments/92893970"},"html":{"href":"https://github.com/aws/aws-sdk-php/pull/1137#discussion_r92893970"},"pull_request":{"href":"https://api.github.com/repos/aws/aws-sdk-php/pulls/1137"}}},"pull_request":{"url":"https://api.github.com/repos/aws/aws-sdk-php/pulls/1137","id":97367491,"html_url":"https://github.com/aws/aws-sdk-php/pull/1137","diff_url":"https://github.com/aws/aws-sdk-php/pull/1137.diff","patch_url":"https://github.com/aws/aws-sdk-php/pull/1137.patch","issue_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/1137","number":1137,"state":"open","locked":false,"title":"Adds support for AssumeRole and ./aws/config ini credentials","user":{"login":"cjyclaire","id":10790394,"avatar_url":"https://avatars.githubusercontent.com/u/10790394?v=3","gravatar_id":"","url":"https://api.github.com/users/cjyclaire","html_url":"https://github.com/cjyclaire","followers_url":"https://api.github.com/users/cjyclaire/followers","following_url":"https://api.github.com/users/cjyclaire/following{/other_user}","gists_url":"https://api.github.com/users/cjyclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/cjyclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjyclaire/subscriptions","organizations_url":"https://api.github.com/users/cjyclaire/orgs","repos_url":"https://api.github.com/users/cjyclaire/repos","events_url":"https://api.github.com/users/cjyclaire/events{/privacy}","received_events_url":"https://api.github.com/users/cjyclaire/received_events","type":"User","site_admin":false},"body":"Referencing PR #1077 \r\n\r\nThis PR covers:\r\n1. Introducing `AssumeRoleCredentialProvider`\r\n2. Supports source ini credentials from `./aws/config` file in `defaultProvider`\r\n3. Adding documentation regrading current behavior.\r\n\r\n@mtdowling ","created_at":"2016-12-09T19:38:18Z","updated_at":"2016-12-16T22:07:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"990caf2590992bb720e1bb6a2e748eb786c598d5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/aws/aws-sdk-php/pulls/1137/commits","review_comments_url":"https://api.github.com/repos/aws/aws-sdk-php/pulls/1137/comments","review_comment_url":"https://api.github.com/repos/aws/aws-sdk-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/1137/comments","statuses_url":"https://api.github.com/repos/aws/aws-sdk-php/statuses/d56369aaf96496cd3676037c7216e020907437e7","head":{"label":"cjyclaire:feature/assume-role-support","ref":"feature/assume-role-support","sha":"d56369aaf96496cd3676037c7216e020907437e7","user":{"login":"cjyclaire","id":10790394,"avatar_url":"https://avatars.githubusercontent.com/u/10790394?v=3","gravatar_id":"","url":"https://api.github.com/users/cjyclaire","html_url":"https://github.com/cjyclaire","followers_url":"https://api.github.com/users/cjyclaire/followers","following_url":"https://api.github.com/users/cjyclaire/following{/other_user}","gists_url":"https://api.github.com/users/cjyclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/cjyclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjyclaire/subscriptions","organizations_url":"https://api.github.com/users/cjyclaire/orgs","repos_url":"https://api.github.com/users/cjyclaire/repos","events_url":"https://api.github.com/users/cjyclaire/events{/privacy}","received_events_url":"https://api.github.com/users/cjyclaire/received_events","type":"User","site_admin":false},"repo":{"id":62422066,"name":"aws-sdk-php","full_name":"cjyclaire/aws-sdk-php","owner":{"login":"cjyclaire","id":10790394,"avatar_url":"https://avatars.githubusercontent.com/u/10790394?v=3","gravatar_id":"","url":"https://api.github.com/users/cjyclaire","html_url":"https://github.com/cjyclaire","followers_url":"https://api.github.com/users/cjyclaire/followers","following_url":"https://api.github.com/users/cjyclaire/following{/other_user}","gists_url":"https://api.github.com/users/cjyclaire/gists{/gist_id}","starred_url":"https://api.github.com/users/cjyclaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjyclaire/subscriptions","organizations_url":"https://api.github.com/users/cjyclaire/orgs","repos_url":"https://api.github.com/users/cjyclaire/repos","events_url":"https://api.github.com/users/cjyclaire/events{/privacy}","received_events_url":"https://api.github.com/users/cjyclaire/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cjyclaire/aws-sdk-php","description":"Official repository of the AWS SDK for PHP (@awsforphp)","fork":true,"url":"https://api.github.com/repos/cjyclaire/aws-sdk-php","forks_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/forks","keys_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/teams","hooks_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/hooks","issue_events_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/issues/events{/number}","events_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/events","assignees_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/assignees{/user}","branches_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/branches{/branch}","tags_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/tags","blobs_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/statuses/{sha}","languages_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/languages","stargazers_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/stargazers","contributors_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/contributors","subscribers_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/subscribers","subscription_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/subscription","commits_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/contents/{+path}","compare_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/merges","archive_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/downloads","issues_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/issues{/number}","pulls_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/pulls{/number}","milestones_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/milestones{/number}","notifications_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/labels{/name}","releases_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/releases{/id}","deployments_url":"https://api.github.com/repos/cjyclaire/aws-sdk-php/deployments","created_at":"2016-07-01T22:03:52Z","updated_at":"2016-07-01T22:03:56Z","pushed_at":"2016-12-16T18:42:06Z","git_url":"git://github.com/cjyclaire/aws-sdk-php.git","ssh_url":"git@github.com:cjyclaire/aws-sdk-php.git","clone_url":"https://github.com/cjyclaire/aws-sdk-php.git","svn_url":"https://github.com/cjyclaire/aws-sdk-php","homepage":"http://aws.amazon.com/sdkforphp","size":30258,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aws:master","ref":"master","sha":"5a05ae6851405587f0bdeedb67abfe997a079ac0","user":{"login":"aws","id":2232217,"avatar_url":"https://avatars.githubusercontent.com/u/2232217?v=3","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"repo":{"id":6269013,"name":"aws-sdk-php","full_name":"aws/aws-sdk-php","owner":{"login":"aws","id":2232217,"avatar_url":"https://avatars.githubusercontent.com/u/2232217?v=3","gravatar_id":"","url":"https://api.github.com/users/aws","html_url":"https://github.com/aws","followers_url":"https://api.github.com/users/aws/followers","following_url":"https://api.github.com/users/aws/following{/other_user}","gists_url":"https://api.github.com/users/aws/gists{/gist_id}","starred_url":"https://api.github.com/users/aws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aws/subscriptions","organizations_url":"https://api.github.com/users/aws/orgs","repos_url":"https://api.github.com/users/aws/repos","events_url":"https://api.github.com/users/aws/events{/privacy}","received_events_url":"https://api.github.com/users/aws/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aws/aws-sdk-php","description":"Official repository of the AWS SDK for PHP (@awsforphp)","fork":false,"url":"https://api.github.com/repos/aws/aws-sdk-php","forks_url":"https://api.github.com/repos/aws/aws-sdk-php/forks","keys_url":"https://api.github.com/repos/aws/aws-sdk-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/aws-sdk-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/aws-sdk-php/teams","hooks_url":"https://api.github.com/repos/aws/aws-sdk-php/hooks","issue_events_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/events{/number}","events_url":"https://api.github.com/repos/aws/aws-sdk-php/events","assignees_url":"https://api.github.com/repos/aws/aws-sdk-php/assignees{/user}","branches_url":"https://api.github.com/repos/aws/aws-sdk-php/branches{/branch}","tags_url":"https://api.github.com/repos/aws/aws-sdk-php/tags","blobs_url":"https://api.github.com/repos/aws/aws-sdk-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/aws-sdk-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/aws-sdk-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/aws-sdk-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/aws-sdk-php/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/aws-sdk-php/languages","stargazers_url":"https://api.github.com/repos/aws/aws-sdk-php/stargazers","contributors_url":"https://api.github.com/repos/aws/aws-sdk-php/contributors","subscribers_url":"https://api.github.com/repos/aws/aws-sdk-php/subscribers","subscription_url":"https://api.github.com/repos/aws/aws-sdk-php/subscription","commits_url":"https://api.github.com/repos/aws/aws-sdk-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/aws-sdk-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/aws-sdk-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws/aws-sdk-php/contents/{+path}","compare_url":"https://api.github.com/repos/aws/aws-sdk-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/aws-sdk-php/merges","archive_url":"https://api.github.com/repos/aws/aws-sdk-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/aws-sdk-php/downloads","issues_url":"https://api.github.com/repos/aws/aws-sdk-php/issues{/number}","pulls_url":"https://api.github.com/repos/aws/aws-sdk-php/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/aws-sdk-php/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/aws-sdk-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/aws-sdk-php/labels{/name}","releases_url":"https://api.github.com/repos/aws/aws-sdk-php/releases{/id}","deployments_url":"https://api.github.com/repos/aws/aws-sdk-php/deployments","created_at":"2012-10-17T21:28:32Z","updated_at":"2016-12-16T14:29:44Z","pushed_at":"2016-12-16T18:42:07Z","git_url":"git://github.com/aws/aws-sdk-php.git","ssh_url":"git@github.com:aws/aws-sdk-php.git","clone_url":"https://github.com/aws/aws-sdk-php.git","svn_url":"https://github.com/aws/aws-sdk-php","homepage":"http://aws.amazon.com/sdkforphp","size":30443,"stargazers_count":2251,"watchers_count":2251,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":621,"mirror_url":null,"open_issues_count":10,"forks":621,"open_issues":10,"watchers":2251,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aws/aws-sdk-php/pulls/1137"},"html":{"href":"https://github.com/aws/aws-sdk-php/pull/1137"},"issue":{"href":"https://api.github.com/repos/aws/aws-sdk-php/issues/1137"},"comments":{"href":"https://api.github.com/repos/aws/aws-sdk-php/issues/1137/comments"},"review_comments":{"href":"https://api.github.com/repos/aws/aws-sdk-php/pulls/1137/comments"},"review_comment":{"href":"https://api.github.com/repos/aws/aws-sdk-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aws/aws-sdk-php/pulls/1137/commits"},"statuses":{"href":"https://api.github.com/repos/aws/aws-sdk-php/statuses/d56369aaf96496cd3676037c7216e020907437e7"}}}}
{"actor":{"display_login":"mtdowling"}}