Guide for setting up AWS CLI on OS X
Snowpal AWS CLI Instructions: This article was written a while back but should still serve as a useful (first) reference.
1. Create a User on AWS Console
This step requires admin level access for the AWS account.
Log in to the AWS console as an admin
Go to IAM
Create a User Group with relevant permissions and give it a meaningful name
Create a User with programmatic access and copy the Access Id and secret
Assign the user into the group created above
Share the Access key and secret with the CLI user
For updated documentation and best practices of this process, please visit this guide by AWS.
2. Install and Setup AWS CLI
For installing AWS CLI v2 from terminal, type in the following command,
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /
Note: The command above will install v2 of the AWS CLI which is currently the latest version. In future if the version upgrades, visit this link for an updated command or a GUI installer.
For configuring a CLI user, open command line and run the following command
aws configure --profile snowpal-dev
Enter the provided access key
Enter the provided credentials,
Enter region as us-east-2,
Just hit enter on default output
If everything is successful then you are now ready to use AWS CLI.
For more information on where the credentials are stored on your machine, you can visit https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html
3. Installing AWS SAM CLI
For installing SAM CLI via homebrew, the first step is to install homebrew. If you already have homebrew installed, then you can skip this step.
Run this command to see if you already have homebrew,
brew --version
To install homebrew on your machine, run the following command,
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Make sure to follow the prompts and once homebrew is installed, you will see a similar output,
Homebrew 2.5.7
Homebrew/homebrew-core (git revision 1be3ad; last commit 2020-10-29)
Homebrew/homebrew-cask (git revision a0cf3; last commit 2020-10-29)
To install SAM CLI via homebrew, run the following commands,
brew tap aws/tap
brew install aws-sam-cli
This will install SAM CLI on your machine, to verify the installation, simply run,
sam --version
You are now ready to go ahead and start creating SAM applications.