Day 42: IAM Programmatic access and AWS CLI ๐Ÿš€ โ˜ - 90DaysOfDevOps

ยท

2 min read

Day 42: IAM Programmatic access and AWS CLI ๐Ÿš€ โ˜ - 90DaysOfDevOps

IAM Programmatic access

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.
  1. Go to IAM Console > User > Select a user

  2. Go to Security credentials and click on Create access key -

  1. Select the Command Line interface and create an access key -

  1. Save the generated access key, this is the only time that the secret access key can be viewed or downloaded. You cannot recover it later. However, you can create a new access key at any time. -

Task-02

  • Setup and install AWS CLI and configure your account credentials
  1. We need to install AWS CLI to configure it on our local system, follow the AWS documentation - https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

  2. Run the command - aws configure and give the access key and secret access key as input.

  1. Run any aws command to validate - aws s3 ls

Thank you :)

ย