AWS Configuration
We cover configuring AWS credentials locally, using the AWS provided documentation, which helps setup your ~/.aws
directory and files.
The configuration looks something like this:
File ~/.aws/config
:
1[default] 2output = json 3region = us-east-1 4 5[cloudcasts] 6output = json 7region = us-east-2 8 9## File `~/.aws/credentials`:10[default]11aws_access_key_id = some-access-key12aws_secret_access_key = some-secret-access-key13 14[cloudcasts]15aws_access_key_id = another-access-key16aws_secret_access_key = another-secret-access-key
Setting the profile
when using AWS commands, SDK's, or library configurations can find the configuration and access keys automatically.
For the CLI, you can use the --profile
flag - for example:
1aws --profile=cloudcasts ec2 \2 describe-availability-zones \3 --region us-east-2 \4 --query 'AvailabilityZones[].ZoneName'