We sometimes want to execute AWS commands directly inside our environments. Adding the AWS CLI is a very simple process.
Edit your docker file and add the following (Modifying the keys to your own)
RUN echo AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE RUN echo AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY RUN pip3 install awscli --upgrade --user
When you use the --user switch, pip installs the AWS CLI to
Enjoy using the AWS CLI in your environment.
For storing secrets such as AWS ID and key, you can use environment variables:
This way, if you ever want to share your environment with someone else, your secrets will still be private.
We generally recommend storing your secrets in the most private way that you have available, so you will likely want to store them in user environment variables which are visible only to you. These can be set in your user account settings -- see the article above to learn more.