Skip to main content

Command Palette

Search for a command to run...

How to Easily Configure AWS CLI with Your Access Key and Secret Key

Fast Setup for AWS CLI Using Your Access Key and Secret Key

Updated
2 min read
How to Easily Configure AWS CLI with Your Access Key and Secret Key

This article will investigate how to create an Access Key and Secret and how to use aws configure command.

Please ensure that you have a valid AWS account before proceeding with this article.

Go to your AWS Management Console and search for IAM.

Click on Users in the menu on the left side, then click the Create user button.

Enter a user name and click the Next button.

Click the Next button again

Create the user by clicking the Create user button.

Then go to the user you just created, select Security credentials from the menu, and click Create access key

Select the following options and click the Next button

Enter a description if you want (it's optional), then click Create access key

You now have an Access Key and a Secret Access Key. If you want, you can download them by clicking Download .csv file to save it to your machine.

Make sure to save the Access Key details somewhere because you will never be able to see the Secret Access Key again after you click the Done button.

Now, it's time to configure the AWS CLI in the terminal. Execute the aws configure command and enter the following details.

Now, you're ready to run your Terraform configuration codes for AWS. If you have properly configured the AWS CLI with access keys and secrets, you can integrate your Terraform code with AWS efficiently and securely.

AWS Stack

Part 2 of 2

AWS Stack explores AWS architecture and development with practical guides, best practices, and hands-on examples.

Start from the beginning

Understanding and Using EC2 Key Pairs

How to Create and Use Key Pairs for Secure EC2 Access Using the AWS Console