Connect to AWS
Connect your Ansible Container with Amazon Web Services.
You can connect to AWS by performing the following steps:
- Create Environment Variables.
- Get AWS Caller Information.
- Install boto and boto3.
Prerequisites
Before you connect to AWS
, you’ll need the following:
- Active
AWS
account - Access Key
- Secret Access Key for an existing
IAM user
in theAWS
account
If you do not have the account and keys setup, you can do so by following the links below:
Admin Policy
The user must have theAdministratorAccess
orSystemAdministrator
policy assigned to it.
Create environment variables
Ansible uses AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
to authenticate to AWS.
Once you have acquired the keys, you can create the environment variable with the export
command within the container.
Docker Setup
We have pre-configured the environment to save you the hassle of rebuilding and re-running your containers. All the commands will work on your local setup as well.
Run the following commands in the Ansible
environment:
Get hands-on with 1200+ tech skills courses.