Terraform is a infrastructure as code that is free and open-source. It offers a consistent CLI workflow for managing hundreds of cloud services. Declarative configuration files are created by Terraform by codifying cloud APIs.
AWS IAM (Identity and Access Management) user is a type of entity within the AWS (Amazon Web Services) platform that represents an individual or application requiring access to AWS resources. IAM users are distinct from the AWS account root user, which has complete administrative privileges.
- Up and running virtual or physicals machine.
- Basic knowledge of AWS cloud and services .
- Terraform and AWS CLI should be installed on the ubuntu machine.
Use the given links to install AWS CLI and terraform on ubuntu machine
In this post, We will show you how to create AWS IAM user and configure with terraform on ubuntu 22.04 LTS
Step 1: Login AWS Account
To create an AWS IAM user, you need to have the necessary permissions and access to the AWS Management Console or use the AWS CLI (Command Line Interface). Here are the steps to create an IAM user using the AWS Management Console:
Open the AWS Management Console in your web browser.
Navigate to the IAM service by searching for “IAM” in the AWS Management Console’s search bar or by finding it under the “Security, Identity & Compliance” section.
Click on IAM services and In the IAM dashboard, click on “Users” in the sidebar.
Click on the “Add user” button to start creating a new IAM user.
Enter a name for the user in the “User name” field. This should be a unique identifier for the user.
If you selected programmatic access, you can specify the user’s permissions by attaching an existing policy or creating a new one. Policies define the permissions granted to the user. Click on the “Next: Permissions” button to proceed. If you selected AWS Management Console access, you can skip this step
Review the permissions and click on the “Next: Tags” button if you want to add tags to the user (optional). Tags are key-value pairs that can be used for resource organization and management.
On the success page, you will see the user’s access key ID and secret access key (if programmatic access was selected). These credentials are important for accessing AWS services programmatically using APIs or the AWS CLI. Make sure to download or copy these credentials as they will not be displayed again.