Install and Configure Aws cli On Window

Use this command to install aws cli on window

 msiexec.exe /i

Configuring AWS CLI:

Before you can start using AWS CLI, you need to configure it with your AWS credentials and specify a default region. You can do this by running:

aws configure

This command will prompt you to enter:

  • AWS Access Key ID: This is your AWS access key.
  • AWS Secret Access Key: This is the corresponding secret key.
  • Default region name: Enter your preferred AWS region (e.g., us-east-1).
  • Default output format: You can leave this as ‘json’ or choose another format.

Basic Commands:

Here are some basic AWS CLI commands to get you started:

List S3 buckets:

aws s3 ls

List EC2 instances:

aws ec2 describe-instances

List available AWS regions:

aws ec2 describe-regions

Named Profiles (Optional):

If you have multiple AWS accounts or need to switch between different AWS configurations, you can use named profiles. To create a named profile, use the --profile flag:

aws configure --profile myprofile

This will create a profile named myprofile in your AWS CLI configuration. You can then use this profile with commands like this:

aws s3 ls --profile myprofile