Skip to content

Creating the retrieving the IAM Access and Secret Access Keys using Ansible.

License

Notifications You must be signed in to change notification settings

lpossamai/ansible-iam-cli-keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-iam-cli-keys

Creating the retrieving the IAM Access and Secret Access Keys using Ansible.

Ansible IAM module

As per May 2020, the IAM Ansible module allows you to create the AWS IAM Access Key, but unfortunately, it does not allow you to retrive the nearly created Secret Access Key.

I was trying to automate the creation of my IAM users and had to come up with a workaround.

This repository

Using this provided code, you'll be able to:

  1. Creates IAM Users and their Access and Secret Access Keys for CLI usage
  2. Creates FullAdmin (AdministratorAccess) and ReadOnly (ReadOnlyAccess) groups for IAM users
  3. Creates and applies the Force MFA policy to the groups
  4. Creates and applies an IAM Password Policy

This is a work in progress

If you have suggestions, please, submit a Pull Request.

USAGE

  1. Set the AWS_PROFILE in your environment - I'm using Arch Linux here: export AWS_PROFILE=test-profile
  2. Clone the repository
  3. Change the variables 'vars/user-list.yml'
  4. Update the usernames in the groups for 'task/create-group.yml'

Note: The password to access the Console will be saved in the "passwordfile" file.

About

Creating the retrieving the IAM Access and Secret Access Keys using Ansible.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published