You must specify a region. You can also configure your region by running “aws configure”.
When we execute an AWS CLI command, we need to supply the AWS Region. If it is not specified, we get the error message:
You must specify a region. You can also configure your region by running “
configure”. aws
We can add the region with the –region command line argument, or store it in the ~/.
The format of the ~/.
[default]
aws_access_key_id = …
aws_secret_access_key = …
[my-account]
aws_access_key_id = …
aws_secret_access_key = …
The format of the ~/.aws/config file is the following. Make sure to add the word “profile” within the square brackets for every profile you specified in the credentials file, except for the “default” one!!!
[default]
region = us-east-1
output = json
[profile my-account]
region = us-east-1
output = json