# #Day42:-IAM Programmatic access and AWS CLI 🚀 ☁

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1709820306671/2f7f3956-3a15-4b4f-b12f-453d76db67e1.png align="center")

## **IAM Programmatic access**

This is the feature of AWS that allows to access AWS resources without entering the AWS console. To access your AWS account from a terminal or system, you can use AWS Access keys and AWS Secret Access keys. Programmatic access can be quite powerful, so implementing best practices to protect access key IDs and secret access keys is important to prevent accidental or malicious account activity.

## **AWS CLI**

The AWS Command Line Interface (AWS CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts. The AWS CLI v2 offers several new features including improved installers, new configuration options such as AWS IAM Identity Center (successor to AWS SSO), and various interactive features.

## **Task-01: Create AWS\_ACCESS\_KEY\_ID and AWS\_SECRET\_ACCESS\_KEY from AWS Console**

1. We have already seen how to create an IAM user in my previous blog. Here we can created a user.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1707918803678/866253a5-40dc-4833-a5e4-9f7aa065f156.png?auto=compress,format&format=webp align="left")
    
2. Navigate to the security credentials section and create Access Key.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681792104525/8dc6d7a8-c4a5-4480-8786-473a1e8d072d.png?auto=compress,format&format=webp&auto=compress,format&format=webp align="left")
    
3. Choose the CLI option or as per your requirement.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681792140038/a1ed948a-cce2-42da-9b35-2fb5fe9ee852.png?auto=compress,format&format=webp&auto=compress,format&format=webp align="left")
    
4. Now, create the access key.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681792199565/3a2d7e10-b77d-4751-b94c-f2d35bba2a43.png?auto=compress,format&format=webp&auto=compress,format&format=webp align="left")
    
5. You can see two keys now which are the Access key and the Secret access key.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681792230734/195621ad-eba4-4bcd-9137-af75132e8e61.png?auto=compress,format&format=webp&auto=compress,format&format=webp align="left")
    
6. You can verify the status of the key in the user section.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681792282539/2c6ce008-756e-4207-8c81-4eeeca4432e9.png?auto=compress,format&format=webp&auto=compress,format&format=webp align="left")
    

## **Task-02: Setup and install AWS CLI and configure your account credentials**

1. Download the Windows version of AWS CLI.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681792560677/9192092d-65d0-413d-bb11-34663164db08.png?auto=compress,format&format=webp&auto=compress,format&format=webp align="left")
    
2. Follow the default process to install the CLI version.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681792636304/91aa4225-33fc-4985-bdee-c3a4c1ccc47e.png?auto=compress,format&format=webp&auto=compress,format&format=webp align="left")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681792704454/3ba141fc-ecd1-4658-b0a5-84adc8fd726e.png?auto=compress,format&format=webp&auto=compress,format&format=webp align="left")
    
3. After the installation, navigate to CMD and check the CLI version.
    
4. Connect AWS to CLI by providing the keys generated in Task 1. You can verify the connection of CLI to AWS by checking available instances in AWS.
