banner

KuchBhiLearning - A free website to learn and code

This is a good learning site. This contains details of cloud computing, AWS, AWS-CDK, AWS-SDK codes and examples including S3, Redis, lambda, api-gateway, cloudfront, cloudformation.

Configure AWS Profile

When we want to deploy through locally or deploying through CDK. We need AWS CLI setup.

It is a very simple process to download the CLI and instantly connect to AWS.

Firstly we need to install AWS CLI through AWS.

Or follow the below steps

  1. Download and run the AWS CLI MSI installer for Windows (64-bit):

    https://awscli.amazonaws.com/AWSCLIV2.msi

  2. Alternatively, you can run the msiexec command to run the MSI installer.

    C:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

    For various parameters that can be used with msiexec, see msiexec on the Microsoft Docs website.

  3. To confirm the installation, open the Start menu, search for cmd to open a command prompt window, and at the command prompt use the aws --version command
    C:\> aws --version
    aws-cli/2.7.24 Python/3.8.8 Windows/10 exe/AMD64 prompt/off

For any errors check troubleshoot

We can now go ahead and execute the command in windows terminal

aws configure --profile preprod

Navigate to IAM -> Users


Select your user and navigate to Security Credentials



Look for Access Key Id and Security access key.

Access key ID: ABCDEF4GSTCD80DGHF9JI

Secret Access Key: A6CDrgj389fbrigrse35jksgkjs58kjsier47HI2

Default region name: us-east-1

Default output format: text

After setting up the profile, let's verify if we are able to connect to AWS.

Execute the following command

aws s3 ls --profile preprod

Verify that all the S3 buckets are listed with is available in the account.

You can setup multiple profiles based on the name.



No comments:

Post a Comment

If you have any doubts, Please let me know

Copyright 2022, KuchBhiLearning - A free website to learn and code. All rights Reserved.
| Designed by Yaseen Shariff