Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/enhancement-Endpoints-18366.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "enhancement",
"category": "Endpoints",
"description": "Improve the NoRegionError message to explain how to set a region (region_name, AWS_DEFAULT_REGION, or ~/.aws/config)."
}
6 changes: 5 additions & 1 deletion botocore/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@ class BaseEndpointResolverError(BotoCoreError):
class NoRegionError(BaseEndpointResolverError):
"""No region was specified."""

fmt = 'You must specify a region.'
fmt = (
'You must specify a region. This can be done by passing the region_name '
'argument to the client or session, using the AWS_DEFAULT_REGION '
'environment variable, or setting "region" in the aws config file.'
)


class EndpointVariantError(BaseEndpointResolverError):
Expand Down