Skip to content
Snippets Groups Projects
Commit f71b3c561b93 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

automation: improve documentation for credentials management

Differential Revision: https://phab.mercurial-scm.org/D6982
parent b8df6a470bbb
No related branches found
No related tags found
No related merge requests found
......@@ -47,5 +47,13 @@
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
......@@ -51,8 +59,13 @@
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
-------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment