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

Fırat TONAKFırat TONAK
2 min read

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.

0
Subscribe to my newsletter

Read articles from Fırat TONAK directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Fırat TONAK
Fırat TONAK