Skip to main content

How to Install and Configure AWS CLI - Command Line Interface

Follow these steps to install and configure AWS CLI on Windows:

Installation of AWS CLI
  1. Download the AWS CLI installer for Windows (64-bit) from AWS CLI Installer Link
  2. Run the installer and follow the prompts to install the CLI on your machine.
  3. Once the installation is completed. open the windows command prompt and type the command:  aws --version
  4. You should see the command output similar to below


Configure AWS CLI access your cloud resources

  • Login to AWS management console
  • Goto Services -> IAM -> Users -> Add User
  • Provide a new username to create. This user will be used to make connection to AWS resources using the CLI.
  • Select AWS Access Type as Programmatic Access and Click "Next".

  • In the next screen we have to provide the required permissions to this user. You will have to decide on what AWS resources this user can access and what kind of privileges are provided on these resources. There are 3 ways to assign permissions to this user:
    • We can add user to an existing IAM role.
    • Copy permissions from an existing IAM user.
    • or Attach any existing policies to the user account
  • In this example, I am using the third option to attach the existing policy.
  • You will see below screen with the list of policies. Choose the policies you want to attach to the user account and click "Next".

  •  In the next screen you can provide any tags to the user, like email address, job title etc.
  • Click Next and Review the details and click "Create User".
  • You will see below screen. Download the csv file, this contains AWS access key and secret key that will be used to connect using AWS CLI.


  • Now goto your commond prompt and type below commands and provide below details:
    • AWS access key ID
    • AWS Secret Access Key 
    • Region 
    • Output format
        C:\> aws configure



  • Once successfully configured you should be able to successfully execute commands against your AWS resources like EC2 instances, dynamodb tables etc, using the CLI. 
  • Some of the command are listed below:
    • aws ec2 describe-instances: To list details of the EC2 instances that you have created
    • aws dynamodb list-tables: List all dynamodb tables
    • aws help: Displays help for the aws cli.
    • aws <service_name> help: Displays available commands for that aws service.

Comments

Popular posts from this blog

Configure Oracle ASM Disks on AIX

Configure Oracle ASM Disks on AIX You can use below steps to configure the new disks for ASM after the raw disks are added to your AIX server by your System/Infrastructure team experts: # /usr/sbin/lsdev -Cc disk The output from this command is similar to the following: hdisk9 Available 02-T1-01 PURE MPIO Drive (Fibre) hdisk10 Available 02-T1-01 PURE MPIO Drive (Fibre) If the new disks are not listed as available, then use the below command to configure the new disks. # /usr/sbin/cfgmgr Enter the following command to identify the device names for the physical disks that you want to use: # /usr/sbin/lspv | grep -i none This command displays information similar to the following for each disk that is not configured in a volume group: hdisk9     0000014652369872   None In the above example hdisk9 is the device name and  0000014652369872  is the physical volume ID (PVID). The disks that you want to use may have a PVID, but they must not belong to a volume group. PVID must be cleared for

Adding New Disks to Existing ASM Disk Group

Add Disks to Existing ASM Disk Group In this blog I will show how to add new disks to an existing ASM Disk group. This also contains the steps to perform the migration from existing to the new storage system. In order to add the disk to the ASM disk group, you will first need to configure these disk using the operating system commands. I have provided the steps to configure the disks on AIX system in my blog " Configure Oracle ASM Disks on AIX" Adding New Disks to DATA Disk Group (Storage Migration for DATA Disk Group) Login to your ASM instance $ sqlplus / as sysasm If the name of the new disk is in different format from the existing disk, the modify the asm_diskstring parameter to identify the new disks. In my below example /dev/ora_data* is the format of the existing disks and /dev/new_disk* is the naming format of the newly configured disks. You should not modify this parameter unless the naming format changes. SQL> alter system set asm_diskstring = '/dev/ora_data*

Installing Splunk on AWS EC2 - Red Hat Linux

Installing Splunk on AWS EC2 - Red Hat Linux In this article we will see how to install Splunk on Red Hat Linux using Amazon AWS EC2 instance. We would first need to create a EC2 instance on Amazon AWS. Steps to Create EC2 Instance Login to your AWS console.  Under Services -> Click on EC2 Click on Launch Instance Choose an Amazon Machine Image (AMI). In my case case, I am using "Red Hat Enterprise Linux 8 (HVM)" that is available as free tier. Choose an Instance Type - General purpose - t2.micro, as this is eligible as free tier. Click on Review and Launch In the next step, it will show your EC2 instance configuration. Click on "Launch". Another window will open saying to "Select an existing key pair or create a new key pair". You will need to create a new key pair or choose an existing if you already have one. Key-pair file is a .pem file which is used to connect to your AWS EC2 instance using password less authentication. Download key pair file and C