Create AWS IAM User with programmatic access.
IAM is all about the access management. It defines what user, or an application can do with the resources created in our AWS Account.
Through IAM we can specify permission to control which operations a user or role can perform on AWS resources.
IAM policies define access control and permission of various AWS resource.
Policies are stored in AWS as JSON documents.
When we create a user in AWS, we have an option to select the access type — Programmatic access
— AWS Management Console access
Step 1: Login to AWS console. (Can be done from AWS CLI, AWS SDK, Cloud formation and terraform as well). Here we will use console approach.
Step 2: Go to IAM Service. As shown below, access the IAM service to create the user.
Create a user name — terraform-user
Step 3: Assign permission to user. Choose one of the following options:
a.) Attach existing policies directly: Select from a list of managed policies (predefined by AWS or custom policies you’ve created).
b.) Create inline policy: Write a custom policy directly for the user.
select the policy and create the user.
Create the Access key and secret key.
Select the purpose of access key. Download and use the access key.