Aws Cli

Aws Cli

  • AWS CLI - Command Line Interface

  • The AWS Command Line Interface (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.

Difference between aws console and CLI:

While the AWS Console is more user-friendly and easier for beginners, the AWS CLI is more powerful and flexible, allowing you to automate tasks and manage resources more efficiently.

AWS CLI Key Features:

  1. Unified Tool: The AWS CLI provides a unified tool to manage your AWS services from the command line, allowing you to interact with multiple services using a single interface.

  2. Scripting and Automation: You can use the AWS CLI to script and automate common tasks, enabling you to automate workflows, create custom solutions, and integrate AWS services into your applications.

  3. Easy Installation and Configuration: The AWS CLI is easy to install and configure on various operating systems, providing a consistent experience across different environments.

  4. Access to AWS Services: The AWS CLI provides access to a wide range of AWS services, allowing you to manage resources, configure settings, and perform operations across different services.

  5. Customization and Extensibility: You can customize the AWS CLI by creating custom commands, plugins, and extensions to tailor it to your specific needs and workflows.

  6. Secure Credentials Management: The AWS CLI securely manages your AWS credentials and provides options to store and retrieve credentials securely, helping you maintain security best practices while interacting with AWS services.

  7. Output Formatting: The AWS CLI offers various output formats, such as JSON, text , and table, making it easy to parse and manipulate the output of commands based on your requirements.

    These key features make the AWS CLI a versatile and powerful tool for managing and interacting with AWS services efficiently and effectively.

Installation:

-Login to aws console

-Create instance and login through SSH

-Check and confirm aws cli is currently not installed on instance

#curl "awscli.amazonaws.com/awscli-exe-linux-x86_6.." -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/install

#unzip awscliv2.zip

#sudo apt install unzip Install unzip if not already

#sudo ./aws/install

#sudo ./aws/install --bin-dir/usr/local/bin--install-dir/usr/local/aws-cli--update

Once done, check if aws cli installed with command #aws --version.

Ref - https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

** Now we will configure aws CLI

#aws configure

Here we have to provide AWS Access Key ID & AWS Secret Access Key.

Step-by-Step Guide to Create an Access Key

  1. Sign in to the AWS Management Console:

  2. Navigate to the IAM Console:

  3. Select the User:

    • Click on the name of the user for whom you want to create an access key.
  4. Create Access Key:

    • On the User details page, choose the Security credentials tab.

    • Scroll down to the Access keys section.

    • Choose Create access key.

  5. Download the Access Key:

    • A dialog box will appear with the new access key ID and secret access key.

    • Click on the Download .csv file button to save the access key ID and secret access key to a file.

    • Important: Make sure to download and securely store the access key as this is the only time you will be able to see the secret access key. You will not be able to retrieve it again once you close the dialog.

THANK YOU FOR READING MY BLOG:)