Day 42: IAM Programmatic access and AWS CLI ????

Day 42: IAM Programmatic access and AWS CLI ????

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.

  • Open the Amazon Management Console and log in.
  • At the top right corner of the console, click on your username, and then choose "Security Credentials" from the drop-down list.

No alt text provided for this image
No alt text provided for this image

  • Click on the "Access keys (access key ID and secret access key)" section.

No alt text provided for this image

  • Simply select "Create Access Key."

No alt text provided for this image
No alt text provided for this image

  • You will see both your secret access key and access key ID. Make sure to save the CSV file with your access key information in a safe place after downloading it.

No alt text provided for this image
No alt text provided for this image

Task-02

Setup and install AWS CLI and configure your account credentials

Install the AWS CLI by following the instructions for your operating system:?https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

  • Verify the aws-cli version

No alt text provided for this image

Open a terminal or command prompt after installing the Amazon CLI, then enter the following command to set up your account credentials:

Your AWS Access Key ID and Secret Access Key must be entered when requested. The access key and secret key from the downloaded csv file should be copied and pasted. Input for your default region and output format will also be requested. Select an appropriate output format and the region that is nearest to your location.

No alt text provided for this image

  • After setting up your default settings and entering your credentials, you may execute the following command to see if the CLI is operational:

No alt text provided for this image
No alt text provided for this image

Your default S3 bucket's contents should be listed by this command. Now that the Amazon CLI has been installed and set up, you may set up your account credentials.

This concludes the article; Please respond and offer your thoughts.??????

??? Warren Parad

CTO Authress | AWS Community Builder | Speaker | Cloud Security Architect

12 个月

It's best practice never to use access keys and secrets. I would likely recommend reviewing this article for recommended security practices regarding AWS credentials: https://dev.to/authress/when-to-use-aws-credentials-2ki4

回复

要查看或添加评论,请登录

Vinay Kumar的更多文章

  • DevOps Project - 4 ????

    DevOps Project - 4 ????

    Project Description The project aims to deploy a web application using Docker Swarm, a container orchestration tool…

    7 条评论
  • DevOps Project 3 ????

    DevOps Project 3 ????

    Project Description The project involves hosting a static website using an AWS S3 bucket. Amazon S3 is an object…

    3 条评论
  • DevOps Project -2 ????

    DevOps Project -2 ????

    Project Description The project is about automating the deployment process of a web application using Jenkins and its…

  • Day 80: DevOps Project 1 ????

    Day 80: DevOps Project 1 ????

    Project Description The project aims to automate the building, testing, and deployment process of a web application…

    2 条评论
  • Day 73 - Setup Grafana on AWS EC2 Instance ????

    Day 73 - Setup Grafana on AWS EC2 Instance ????

    Task: Set up grafana in your local environment on AWS EC2. Go to the AWS console and Launch an EC2 instance To enable…

  • Day 72 - Grafana ????

    Day 72 - Grafana ????

    What is Grafana? No matter where your metrics are kept, Grafana is an open-source data visualization and monitoring…

    4 条评论
  • Day71 - Terraform Interview Questions ????

    Day71 - Terraform Interview Questions ????

    1. What is Terraform and how it is different from other IaaC tools? HashiCorp's Terraform is an Infrastructure as Code…

  • Day 70 - Terraform Modules ????

    Day 70 - Terraform Modules ????

    Modules are containers for multiple resources that are used together. A module consists of a collection of .

    4 条评论
  • Day 69 - Meta-Arguments in Terraform ???

    Day 69 - Meta-Arguments in Terraform ???

    When you define a resource block in Terraform, by default, this specifies one resource that will be created. To manage…

    4 条评论
  • Day 65 - Terraform Resources ????

    Day 65 - Terraform Resources ????

    Understanding Terraform Resources A resource in Terraform represents a component of your infrastructure, such as a…

    2 条评论

社区洞察

其他会员也浏览了