Day 42: IAM Programmatic access and AWS CLI 🚀 ☁

"I'm a 3rd-year Computer Engineering student at Marwadi University with skills in C++, web development (MERN stack), and DevOps tools like Kubernetes. I contribute to open-source projects and share tech knowledge on GitHub and LinkedIn. I'm learning cloud technologies and app deployment. As an Internshala Student Partner, I help others find jobs and courses." now currently focusing on #90DaysOfDevops
Today is more of a reading excercise and getting some programmatic access for your AWS account
IAM Programmatic access
In order to access your AWS account from a terminal or system, you can use AWS Access keys and AWS Secret Access keys.
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.
Task-02
- Setup and install AWS CLI and configure your account credentials
Let me know if you have any issues while doing the task.
Let’s begin with Task-01
Task 01: Create AWS Access Keys
Log in to AWS Management Console:
- Go to the AWS Management Console.
Navigate to IAM:
Click on your username in the top right corner of the console and select "Security Credentials" from the drop-down menu.

Create a New IAM User:
Click on the "Access keys (access key ID and secret access key)" section.
Click on "Create Access Key".



Download Access Keys:
- Your Access Key ID and Secret Access Key will be displayed. Download the CSV file containing the access key information and store it in a secure location.
Let’s begin with Task 02
Launch EC2 instance with below configuration
AMI: Ubuntu
Instance Type: t2.micro
Network Settings: Allow HTTP and HTTPS traffic

Download and Install AWS CLI:
- Follow the instructions from documentation AWS CLI installation
sudo apt update
sudo apt install unzip
To install the AWS CLI, run the following commands.
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Check AWS CLI Version:
Open your terminal or command prompt and run the following command:
aws --versionEnsure that AWS CLI is installed correctly and the version is displayed.

Configure AWS CLI:
Run the command:
aws configureEnter your AWS Access Key ID, AWS Secret Access Key, Default region name, and Default output format when prompted.

Example:
$ aws configure
AWS Access Key ID [None]: <Your_Access_Key_ID>
AWS Secret Access Key [None]: <Your_Secret_Access_Key>
Default region name [None]: us-west-2
Default output format [None]: json
Verify Configuration:
Run a simple AWS CLI command to verify the setup:
Copy
Copy
aws s3 lsThis command lists your S3 buckets. If configured correctly, you should see a list of your S3 buckets or an empty list if you don't have any.

Thankyou for reading !!!!!




