Reputation: 41
botocore.exceptions.NoRegionError: You must specify a region.
During handling of the above exception, another exception occurred:
-----------------------------------------------------------------------------
I've already configured my AWS region in [~/.aws/config]
but this problem arises again and again.
How can I solve this issue?
Upvotes: 3
Views: 12189
Reputation: 2078
I hit the same issue. Make sure you have the right region name in your code like below. You can find region names here: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
config = Config(
region_name = 'us-east-1' # Choose a valid AWS Region.
)
Upvotes: 1
Reputation: 192
$aws configure
AWS Access Key ID [****************LT6U]:
AWS Secret Access Key [****************iGrm]:
Default region name [ap-south-1]:
Default output format [json]:
specify: Default region name [ap-south-1]:
Mine is ap-south-1
. Yours may be different.
Upvotes: 3