AWS CLI – Install and Setup

AWS CLI

This article will show you how to install, setup and configure the AWS CLI on your computer and the common commands needed when using the CLI

Installing AWS CLI

To install the AWS CLI, go to the AWS website here and install the right package for your computer.

Create an IAM User

Navigate to IAM in the AWS console and then click on Users and then create a new user.

Fill out the details in all of the steps in the setup. Ensure that Programmatic Access is selected.

Configure AWS CLI

Configuring the AWS CLI is the next step and can be completed by following these steps.

Deploy a Lambda to AWS using the AWS CLI

https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-awscli.html

Update a Lambda in AWS with new code

https://docs.aws.amazon.com/cli/latest/reference/lambda/update-function-code.html

aws lambda update-function-code --function-name {YOUR-LAMBDA-NAME} --zip-file fileb://{ZIP/JAR FILE NAME}

For the --zip-file fileb://path, it’s easiest to make sure you are running the command from the directory that contains the zip or jar file.

Create additional AWS CLI Profiles

aws configure --profile <YOUR NEW PROFILE NAME>

Then complete the normal AWS CLI Configure steps.

Switch AWS CLI Profile

If you have multiple AWS User Profiles on your computer, you can switch between user profiles by using the following command.

 export AWS_DEFAULT_PROFILE=<YOUR PROFILE NAME>

You may also like...

1 Response

  1. 16th May 2020

    […] You will also need to install the AWS CLI, a tutorial of which can be found here. […]

Leave a Reply

Your email address will not be published. Required fields are marked *