# 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.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735098699310/b8817e31-af25-4580-835d-8b22c45492f9.png align="center")

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

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735098979994/725aa98e-3673-40f4-a364-642be0ea0d0a.png align="center")

Enter a `user name` and click the `Next` button.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735145564245/09e343a5-58b9-42fc-976b-00b78f26c462.png align="center")

Click the `Next` button again

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735100039916/2936a3dc-4574-4c30-abbd-2a24e9cb3a21.png align="center")

Create the user by clicking the `Create user` button.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735145700803/2097a6c8-8a76-4e56-87c7-34132dfa6023.png align="center")

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

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735100445256/3d0580ba-23cc-4ede-94cf-baa69cb85d29.png align="center")

Select the following options and click the `Next` button

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735100548260/3ab0c2b5-ea31-49dc-8831-34bdfe6e9514.png align="center")

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

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735145834318/8bf53c13-2570-4391-a158-f4085ad6777e.png align="center")

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.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735101228165/20167fc0-92f0-412c-b432-a55c2ceca729.png align="center")

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

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1735101689552/9e7b0e91-609a-43f0-ad40-0482ed945873.png align="center")

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.
