changeset 43056:f71b3c561b93

automation: improve documentation for credentials management Differential Revision: https://phab.mercurial-scm.org/D6982
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 05 Oct 2019 11:58:17 -0400
parents b8df6a470bbb
children c5c502bd1f70
files contrib/automation/README.rst
diffstat 1 files changed, 18 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/automation/README.rst	Sat Oct 05 11:23:14 2019 -0400
+++ b/contrib/automation/README.rst	Sat Oct 05 11:58:17 2019 -0400
@@ -47,12 +47,25 @@
 for how ``boto3`` works. Once you have configured your environment such
 that ``boto3`` can find credentials, interaction with AWS should *just work*.
 
-.. hint::
+To configure ``boto3``, you can use the ``aws configure`` command to
+write out configuration files. (The ``aws`` command is typically provided
+by an ``awscli`` package available in your package manager, including
+``pip``.) Alternatively, you can write out files in ``~/.aws/`` directly.
+e.g.::
+
+   # ~/.aws/config
+   [default]
+   region = us-west-2
 
-   Typically you have a ``~/.aws/credentials`` file containing AWS
-   credentials. If you manage multiple credentials, you can override which
-   *profile* to use at run-time by setting the ``AWS_PROFILE`` environment
-   variable.
+   # ~/.aws/credentials
+   [default]
+   aws_access_key_id = XXXX
+   aws_secret_access_key = YYYY
+
+If you have multiple AWS accounts, you can name the profile something
+different from ``default``. e.g. ``hg``. You can influence which profile
+is used by ``boto3`` by setting the ``AWS_PROFILE`` environment variable.
+e.g. ``AWS_PROFILE=hg``.
 
 Resource Management
 -------------------