region - AWS SDKs and Tools Shared Configuration and Credentials

region

Specifies the AWS Region to send requests to for commands requested using this profile.

Details

Default value: None. You must specify this value explicitly.

Valid values:

  • Any of the Region codes available for the chosen service as listed in AWS Regions and Endpoints in the Amazon Web Services General Reference. For example, the value us-east-1 sets the endpoint to the AWS Region US East (N. Virginia).

  • aws_global, to specify the global endpoint for services that support a separate global endpoint in addition to regional endpoints, such as AWS Security Token Service (AWS STS) and Amazon Simple Storage Service (Amazon S3).

Ways to set this value

Location Supported Example
config file X
region = us-west-2
credentials file -
Environment variable X Linux/macOS:
export AWS_DEFAULT_REGION us-west-2
Windows:
setx AWS_DEFAULT_REGION us-west-2
CLI parameter X
--region us-west-2

Compatibility with AWS SDKS and tools

SDK or tool Supported Notes or more information
AWS Command Line Interface (AWS CLI) X
AWS SDK for .NET X
AWS SDK for PHP -
AWS SDK for Python (Boto3) X

AWS Toolkit for JetBrains consists of:

X

Supports this setting in only the [default] profile. You can change the profile recognized as default by using the environment variable AWS_PROFILE.

This SDK/Tool doesn't support the environment variable equivalent: AWS_DEFAULT_REGION

For more information, see Setting an AWS Region in AWS Toolkit for JetBrains.

AWS Toolkit for Visual Studio -
AWS Toolkit for Visual Studio Code X
AWS Tools for PowerShell X