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.
Go to IAM Console > User > Select a user
Go to Security credentials and click on Create access key -
- Select the Command Line interface and create an access key -
- 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
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
Run the command -
aws configure
and give the access key and secret access key as input.
- Run any aws command to validate -
aws s3 ls
Thank you :)