Throughout this guide, you'll need the AWS CLI to authenticate and push images to ECR, create infrastructure with Terraform, or interact with your AWS account. Here's a quick overview on how to set things up in a couple of minutes
brew install awscli
sudo apt-get update && \
sudo apt-get install -y awscli
aws --version
You should see something like:
aws-cli/2.x.x Python/3.x.x ...
Then configure it by running:
aws configure
You'll be prompted to enter your AWS access key, secret access key, region (e.g. us-east-1
), and output format.
If you've never created AWS credentials before, here's how:
This will generate an AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
pair for you to use.
About permissions: For production environments, you'll want to keep these narrowly scoped. However, for testing purposes, if you're not familiar with AWS IAM policies, you can temporarily use the AdministratorAccess policy, which gives your credentials full access to your AWS account.
Security reminder: Treat these credentials like any other password or API token. Store them securely and consider removing or changing their permissions once you're done with this guide.