Setting up AWS CLI
A guide to Setting up AWS CLI and configuring it for your AWS account.
Prerequisites
- An AWS account. If you don't have one, you can create it here.
MAC Installation
- Open your terminal.
- Run the following command to install AWS CLI using Homebrew:
- Verify the installation by checking the version:
Get AWS Credentials
- Sign in to the AWS Management Console.
- Navigate to the IAM (Identity and Access Management) service.
- In the left sidebar, click on "Users."
- Click on your username.
- Go to the "Security credentials" tab.
- Click on "Create access key."
- Your Access Key ID and Secret Access Key will be displayed. Copy and save them securely.
Configure AWS CLI
- Open your terminal.
- Run the following command to configure AWS CLI:
- You will be prompted to enter the following details:
- AWS Access Key ID: Enter the Access Key ID you obtained earlier.
- AWS Secret Access Key: Enter the Secret Access Key you obtained earlier.
- Default region name: Enter your preferred AWS region (e.g.,
us-east-1
). - Default output format: You can choose
json
,text
, ortable
. For beginners,json
is recommended.
- To verify that AWS CLI is configured correctly, run the following command to list your S3 buckets: If everything is set up correctly, you should see a list of your S3 buckets (if any).