1) Register (if you haven't already) and login to the AWS management console: https://aws.amazon.com/console/
2) To create credentials for the cli, open IAM home https://console.aws.amazon.com/iam/home, select Users on the left navigation bar and click the Add User button.
3) Pick a username, check Programmatic access for AWS access type, and click the Next: Permissions button.
4) Choose any of the available options - Attach existing policies directly is the simplest one. In the list of policy types, search for and select AmazonEC2FullAccess. Click the Next:Tags button.
5) Enter any Tags (optional) and Click the Next:Review button. IAM tags are key-value pairs you can add to your user. Tags can include user information, such as an email address, or can be descriptive, such as a job title.
6) Review your account and click the the Create user button to proceed.
7) Save Keys. You can download a csv and/or save the keys in a text file. After copying this important information, select Close.
8) After you've copied and saved your AWS secret keys, you will upload your SSH public key. In the top left corner of the page select Services -> EC2. On the left sidebar select Network & Security -> Key Pairs. Click the Import Key Pair button.
9) Name this keypair, otherwise the base name of the file will be used (by default
id_rsa). Browse your Ansible Control Station file system for the public key, or copy/paste:
pbcopy < ~/.ssh/id_rsa.pub
This will copy your public key into your clipboard and can then be pasted.
9) Configure aws cli from your local machine:
Provide your credentials (Access Key ID and Secret Access Key) from earlier. Choose a region for your account (e.g.
us-east-2) and output format (
json is recommended).
10) Check the keypair was imported correctly:
aws ec2 describe-key-pairs
you should see your keypair name in the list in JSON format.