{"action":"created","comment":{"url":"https://api.github.com/repos/aws/aws-cli/pulls/comments/25389581","id":25389581,"diff_hunk":"@@ -0,0 +1,209 @@\n+:title: AWS CLI Configuration Variables\n+:description: Configuration Variables for the AWS CLI\n+:category: General\n+:related command: configure, configure get, configure set\n+\n+Configuration values for the AWS CLI can come from several sources:\n+\n+* As a command line option\n+* As an environment variable\n+* As a value in the AWS CLI config file\n+* As a value in the AWS Shared Credential file\n+\n+Some options are only available in the AWS CLI config.  This topic guide covers\n+all the configuration variables available in the AWS CLI.\n+\n+Note that if you are just looking to get the minimum required configuration to\n+run the AWS CLI, we recommend running ``aws configure``, which will prompt you\n+for the necessary configuration values.\n+\n+Config File Format\n+==================\n+\n+The AWS CLI config file, which defaults to ``~/.aws/config`` has the following\n+format::\n+\n+    [default]\n+    aws_access_key_id=foo\n+    aws_secret_access_key=bar\n+    region=us-west-2\n+\n+The ``default`` section refers to the configuration values for the default\n+profile.  You can create profiles, which represent logical groups of\n+configuration.  Profiles that aren't the default profile are specified by\n+creating a section titled \"profile profilename\"::\n+\n+    [profile testing]\n+    aws_access_key_id=foo\n+    aws_secret_access_key=bar\n+    region=us-west-2\n+\n+Nested Values\n+-------------\n+\n+Some service specific configuration, discussed in more detail below, has a\n+single top level key, with nested sub values.  These sub values are denoted by\n+indentation::\n+\n+    [profile testing]\n+    aws_access_key_id = foo\n+    aws_secret_access_key = bar\n+    region = us-west-2\n+    s3 =\n+      max_concurrent_requests=10\n+      max_queue_size=1000\n+\n+\n+General Options\n+===============\n+\n+The AWS CLI has a few general options:\n+\n+=========== ========= ===================== ===================== ============================\n+Variable    Option    Config Entry          Environment Variable  Description\n+=========== ========= ===================== ===================== ============================\n+profile     --profile profile               AWS_DEFAULT_PROFILE   Default profile name\n+----------- --------- --------------------- --------------------- ----------------------------\n+region      --region  region                AWS_DEFAULT_REGION    Default AWS Region\n+----------- --------- --------------------- --------------------- ----------------------------\n+output      --output  output                AWS_DEFAULT_OUTPUT    Default output style\n+=========== ========= ===================== ===================== ============================\n+\n+The third column, Config Entry, is the value you would specify in the AWS CLI\n+config file.  By default, this location is ``~/.aws/config``.  If you need to\n+change this value, you can specify the ``AWS_CONFIG_FILE`` environment variable\n+to change this location.\n+\n+The valid values of the ``output`` configuration variable are:\n+\n+* json\n+* table\n+* text\n+\n+\n+Credentials\n+===========\n+\n+Credentials can be specified in several ways:\n+\n+* Environment variables\n+* The AWS Shared Credential File\n+* The AWS CLI config file\n+\n+=========== ===================== ===================== ============================\n+Variable    Creds/Config Entry    Environment Variable  Description\n+=========== ===================== ===================== ============================\n+access_key  aws_access_key_id     AWS_ACCESS_KEY_ID     AWS Access Key\n+----------- --------------------- --------------------- ----------------------------\n+secret_key  aws_secret_access_key AWS_SECRET_ACCESS_KEY AWS Secret Key\n+----------- --------------------- --------------------- ----------------------------\n+token       aws_session_token     AWS_SESSION_TOKEN     AWS Token (temp credentials)\n+=========== ===================== ===================== ============================\n+\n+The second column specifies the name that you can specify in either the AWS CLI\n+config file or the AWS Shared credentials file (``~/.aws/credentials``).\n+\n+\n+The Shared Credentials File\n+---------------------------\n+\n+The shared credentials file has a fixed location of\n+``~/.aws/credentials``.  This file is an INI formatted file with section names\n+corresponding to profiles.  With each section, the three configuration\n+variables shown above can be specified: ``aws_access_key_id``,\n+``aws_secret_access_key``, ``aws_session_token``.  **These are the only\n+supported values in the shared credential file.**\n+\n+Precedence\n+----------\n+\n+Credentials from environment variables have precedence over credentials from\n+the shared credentials and AWS CLI config file.  Credentials specified in the\n+shared credentials file have precedence over credentials in the AWS CLI config\n+file.\n+\n+\n+Using AWS IAM Roles\n+-------------------\n+\n+Note that configuration variables for using IAM roles can only be in the AWS\n+CLI config file.\n+\n+You can specify the following configuration values in the AWS CLI config file:\n+\n+* ``role_arn`` - The ARN of the role you want to assume.\n+* ``source_profile`` - The AWS CLI profile that contains credentials we should\n+  use for the initial ``assume-role`` call.\n+* ``external_id`` - A unique identifier that is used by third parties to assume\n+  a role in their customers' accounts.  This maps to the ``ExternalId``\n+  parameter in the ``AssumeRole`` operation.  This is an optional parameter.\n+* ``mfa_serial`` - The identification number of the MFA device to use when\n+  assuming a role.  This is an optional parameter.  Specify this value if the\n+  trust policy of the role being assumed includes a condition that requires MFA\n+  authentication. The value is either the serial number for a hardware device\n+  (such as GAHT12345678) or an Amazon Resource Name (ARN) for a virtual device\n+  (such as arn:aws:iam::123456789012:mfa/user).  \n+\n+If you do not have MFA authentication required, then you only need to specify a\n+``role_arn`` and a ``source_profile``.\n+\n+When you specify a profile that has IAM role configuration, the AWS CLI\n+will make an ``AssumeRole`` call to retrieve temporary credentials.  These\n+credentials are then stored (in ``~/.aws/cache``).  Subsequent AWS CLI commands\n+will use the cached temporary credentials until they expire, in which case the\n+AWS CLI will automatically refresh credentials.\n+\n+If you specify an ``mfa_serial``, then the first time an ``AssumeRole`` call is\n+made, you will be prompted to enter the MFA code.  Subsequent commands will use\n+the cached temporary credentials.  However, when the temporary credentials\n+expire, you will be re-prompted for another MFA code.\n+\n+\n+Example configuration::\n+\n+  # In ~/.aws/credentials:\n+  [development]\n+  aws_access_key_id=foo\n+  aws_access_key_id=bar\n+\n+  # In ~/.aws/config\n+  [profile crossaccount]\n+  role_arn=arn:aws:iam:...\n+  source_profile=development\n+\n+\n+Service Specific Configuration\n+==============================\n+\n+\n+aws s3\n+------\n+\n+These values are only applicable for the ``aws s3`` commands.  These\n+configuration values are sub values that must be specified under the top level\n+``s3`` key.\n+\n+These are the configuration values you can set for S3:\n+\n+* ``max_concurrent_requests`` - The maximum number of concurrent requests.\n+* ``max_queue_size`` - The maximum number of tasks in the task queue.\n+* ``multipart_threshold`` - The size threshold where the CLI uses multipart\n+  transfers.\n+* ``multipart_chunksize`` - When using multipart transfers, this is the chunk\n+  size that will be used.\n+\n+Example config::\n+\n+    [profile development]\n+    aws_access_key_id=foo\n+    aws_secret_access_key=bar\n+    s3 =\n+      max_concurrent_requests = 20\n+      max_queue_size = 10000\n+      multipart_threshold = 64MB\n+      multipart_chunksize = 16MB\n+\n+.. I know I'll need to add a proper xref to the s3-config topic.","path":"awscli/topics/config-vars.rst","position":206,"original_position":206,"commit_id":"d16c2bb12a5c941d4f77efa1c1ef091b46b1854b","original_commit_id":"d16c2bb12a5c941d4f77efa1c1ef091b46b1854b","user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"body":"Yeah that is something that I would like to see in the future. It would be super useful for any custom docs that we do.","created_at":"2015-02-25T23:09:50Z","updated_at":"2015-02-25T23:09:50Z","html_url":"https://github.com/aws/aws-cli/pull/1182#discussion_r25389581","pull_request_url":"https://api.github.com/repos/aws/aws-cli/pulls/1182","_links":{"self":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/comments/25389581"},"html":{"href":"https://github.com/aws/aws-cli/pull/1182#discussion_r25389581"},"pull_request":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/1182"}}},"pull_request":{"url":"https://api.github.com/repos/aws/aws-cli/pulls/1182","id":29954310,"html_url":"https://github.com/aws/aws-cli/pull/1182","diff_url":"https://github.com/aws/aws-cli/pull/1182.diff","patch_url":"https://github.com/aws/aws-cli/pull/1182.patch","issue_url":"https://api.github.com/repos/aws/aws-cli/issues/1182","number":1182,"state":"open","locked":false,"title":"Add config var topic guide","user":{"login":"jamesls","id":368057,"avatar_url":"https://avatars.githubusercontent.com/u/368057?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesls","html_url":"https://github.com/jamesls","followers_url":"https://api.github.com/users/jamesls/followers","following_url":"https://api.github.com/users/jamesls/following{/other_user}","gists_url":"https://api.github.com/users/jamesls/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesls/subscriptions","organizations_url":"https://api.github.com/users/jamesls/orgs","repos_url":"https://api.github.com/users/jamesls/repos","events_url":"https://api.github.com/users/jamesls/events{/privacy}","received_events_url":"https://api.github.com/users/jamesls/received_events","type":"User","site_admin":false},"body":"I added a full description for assume role functionality\r\nin this topic guide.  I'm not opposed to doing a similar thing\r\nlike s3 config and just document at a high level the assume role\r\nparams, and refer the user to a separate assume role topic guide\r\nfor more information.\r\n\r\nI know I'll need to update the topic index, but given there's a few topic guide reviews\r\nout right now, I'll do that once I get other topics merged so I can avoid a merge\r\nconflict.\r\n\r\ncc @kyleknap @danielgtaylor ","created_at":"2015-02-25T01:41:25Z","updated_at":"2015-02-25T23:09:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ae09e1c78f53ade8dcab8635866c6168ae687b41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/aws/aws-cli/pulls/1182/commits","review_comments_url":"https://api.github.com/repos/aws/aws-cli/pulls/1182/comments","review_comment_url":"https://api.github.com/repos/aws/aws-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/1182/comments","statuses_url":"https://api.github.com/repos/aws/aws-cli/statuses/d16c2bb12a5c941d4f77efa1c1ef091b46b1854b","head":{"label":"jamesls:config-vars-topic","ref":"config-vars-topic","sha":"d16c2bb12a5c941d4f77efa1c1ef091b46b1854b","user":{"login":"jamesls","id":368057,"avatar_url":"https://avatars.githubusercontent.com/u/368057?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesls","html_url":"https://github.com/jamesls","followers_url":"https://api.github.com/users/jamesls/followers","following_url":"https://api.github.com/users/jamesls/following{/other_user}","gists_url":"https://api.github.com/users/jamesls/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesls/subscriptions","organizations_url":"https://api.github.com/users/jamesls/orgs","repos_url":"https://api.github.com/users/jamesls/repos","events_url":"https://api.github.com/users/jamesls/events{/privacy}","received_events_url":"https://api.github.com/users/jamesls/received_events","type":"User","site_admin":false},"repo":{"id":8471236,"name":"aws-cli","full_name":"jamesls/aws-cli","owner":{"login":"jamesls","id":368057,"avatar_url":"https://avatars.githubusercontent.com/u/368057?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesls","html_url":"https://github.com/jamesls","followers_url":"https://api.github.com/users/jamesls/followers","following_url":"https://api.github.com/users/jamesls/following{/other_user}","gists_url":"https://api.github.com/users/jamesls/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesls/subscriptions","organizations_url":"https://api.github.com/users/jamesls/orgs","repos_url":"https://api.github.com/users/jamesls/repos","events_url":"https://api.github.com/users/jamesls/events{/privacy}","received_events_url":"https://api.github.com/users/jamesls/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamesls/aws-cli","description":"Universal Command Line Interface for Amazon Web Services","fork":true,"url":"https://api.github.com/repos/jamesls/aws-cli","forks_url":"https://api.github.com/repos/jamesls/aws-cli/forks","keys_url":"https://api.github.com/repos/jamesls/aws-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamesls/aws-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamesls/aws-cli/teams","hooks_url":"https://api.github.com/repos/jamesls/aws-cli/hooks","issue_events_url":"https://api.github.com/repos/jamesls/aws-cli/issues/events{/number}","events_url":"https://api.github.com/repos/jamesls/aws-cli/events","assignees_url":"https://api.github.com/repos/jamesls/aws-cli/assignees{/user}","branches_url":"https://api.github.com/repos/jamesls/aws-cli/branches{/branch}","tags_url":"https://api.github.com/repos/jamesls/aws-cli/tags","blobs_url":"https://api.github.com/repos/jamesls/aws-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamesls/aws-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamesls/aws-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamesls/aws-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamesls/aws-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/jamesls/aws-cli/languages","stargazers_url":"https://api.github.com/repos/jamesls/aws-cli/stargazers","contributors_url":"https://api.github.com/repos/jamesls/aws-cli/contributors","subscribers_url":"https://api.github.com/repos/jamesls/aws-cli/subscribers","subscription_url":"https://api.github.com/repos/jamesls/aws-cli/subscription","commits_url":"https://api.github.com/repos/jamesls/aws-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamesls/aws-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamesls/aws-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamesls/aws-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamesls/aws-cli/contents/{+path}","compare_url":"https://api.github.com/repos/jamesls/aws-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamesls/aws-cli/merges","archive_url":"https://api.github.com/repos/jamesls/aws-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamesls/aws-cli/downloads","issues_url":"https://api.github.com/repos/jamesls/aws-cli/issues{/number}","pulls_url":"https://api.github.com/repos/jamesls/aws-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/jamesls/aws-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/jamesls/aws-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamesls/aws-cli/labels{/name}","releases_url":"https://api.github.com/repos/jamesls/aws-cli/releases{/id}","created_at":"2013-02-28T03:36:51Z","updated_at":"2015-02-18T21:17:08Z","pushed_at":"2015-02-25T01:53:44Z","git_url":"git://github.com/jamesls/aws-cli.git","ssh_url":"git@github.com:jamesls/aws-cli.git","clone_url":"https://github.com/jamesls/aws-cli.git","svn_url":"https://github.com/jamesls/aws-cli","homepage":null,"size":7485,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"aws:develop","ref":"develop","sha":"9c4d977ea1d6b93cd15b4690bae097a5e2c24c25","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":6780767,"name":"aws-cli","full_name":"aws/aws-cli","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-cli","description":"Universal Command Line Interface for Amazon Web Services","fork":false,"url":"https://api.github.com/repos/aws/aws-cli","forks_url":"https://api.github.com/repos/aws/aws-cli/forks","keys_url":"https://api.github.com/repos/aws/aws-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aws/aws-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aws/aws-cli/teams","hooks_url":"https://api.github.com/repos/aws/aws-cli/hooks","issue_events_url":"https://api.github.com/repos/aws/aws-cli/issues/events{/number}","events_url":"https://api.github.com/repos/aws/aws-cli/events","assignees_url":"https://api.github.com/repos/aws/aws-cli/assignees{/user}","branches_url":"https://api.github.com/repos/aws/aws-cli/branches{/branch}","tags_url":"https://api.github.com/repos/aws/aws-cli/tags","blobs_url":"https://api.github.com/repos/aws/aws-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aws/aws-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aws/aws-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/aws/aws-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aws/aws-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/aws/aws-cli/languages","stargazers_url":"https://api.github.com/repos/aws/aws-cli/stargazers","contributors_url":"https://api.github.com/repos/aws/aws-cli/contributors","subscribers_url":"https://api.github.com/repos/aws/aws-cli/subscribers","subscription_url":"https://api.github.com/repos/aws/aws-cli/subscription","commits_url":"https://api.github.com/repos/aws/aws-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/aws/aws-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/aws/aws-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/aws/aws-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/aws/aws-cli/contents/{+path}","compare_url":"https://api.github.com/repos/aws/aws-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aws/aws-cli/merges","archive_url":"https://api.github.com/repos/aws/aws-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aws/aws-cli/downloads","issues_url":"https://api.github.com/repos/aws/aws-cli/issues{/number}","pulls_url":"https://api.github.com/repos/aws/aws-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/aws/aws-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/aws/aws-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aws/aws-cli/labels{/name}","releases_url":"https://api.github.com/repos/aws/aws-cli/releases{/id}","created_at":"2012-11-20T16:07:36Z","updated_at":"2015-02-25T22:51:44Z","pushed_at":"2015-02-25T22:51:44Z","git_url":"git://github.com/aws/aws-cli.git","ssh_url":"git@github.com:aws/aws-cli.git","clone_url":"https://github.com/aws/aws-cli.git","svn_url":"https://github.com/aws/aws-cli","homepage":null,"size":14520,"stargazers_count":2550,"watchers_count":2550,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":331,"mirror_url":null,"open_issues_count":122,"forks":331,"open_issues":122,"watchers":2550,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/1182"},"html":{"href":"https://github.com/aws/aws-cli/pull/1182"},"issue":{"href":"https://api.github.com/repos/aws/aws-cli/issues/1182"},"comments":{"href":"https://api.github.com/repos/aws/aws-cli/issues/1182/comments"},"review_comments":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/1182/comments"},"review_comment":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aws/aws-cli/pulls/1182/commits"},"statuses":{"href":"https://api.github.com/repos/aws/aws-cli/statuses/d16c2bb12a5c941d4f77efa1c1ef091b46b1854b"}}}}