# How to change the AWS default Region

How-to guides · Updated 16 November 2026

**Short answer:** For the CLI, run aws configure set region eu-west-2 (add --profile name for another profile), which writes region to ~/.aws/config. The AWS_REGION or AWS_DEFAULT_REGION environment variables override that for a shell session, and --region overrides everything for a single command. In the console, pick a Region from the selector in the navigation bar; a default can be set in the console's settings.

## CLI and SDKs

```
# Default profile
aws configure set region eu-west-2

# A named profile
aws configure set region us-east-1 --profile billing

# Just this shell
export AWS_REGION=eu-west-2

# Check what is in effect, and where it came from
aws configure get region
aws configure list
```

The file entry looks like this:

```
# ~/.aws/config
[default]
region = eu-west-2

[profile billing]
region = us-east-1
```

## Which setting wins

| Priority | Source |
|---|---|
| 1 | `--region` on the command |
| 2 | `AWS_REGION` environment variable |
| 3 | `AWS_DEFAULT_REGION` environment variable |
| 4 | `region` in the active profile in `~/.aws/config` |

SDKs read `AWS_REGION` and the shared config file too, so the same settings apply to your code. Inside AWS (Lambda, ECS, CodeBuild) the platform usually sets `AWS_REGION` for you to the Region the code runs in.

## The console

- The Region selector in the navigation bar changes the Region for Regional services. The console tends to remember the last Region you used for each service.
- To make one Region the starting point, set a default Region in the console's unified settings (from the gear or account menu).
- Global services such as IAM, CloudFront and Route 53 show "Global" instead of a Region, and some pages (billing, for example) aren't Regional at all.

## Region in code and infrastructure tools

- **SDKs:** pass the Region when creating a client (for example `boto3.client("s3", region_name="eu-west-2")`) for anything that must run in a fixed Region, rather than depending on the machine's default.
- **Terraform:** the AWS provider's `region` argument sets it; without it, the provider falls back to the same environment variables and profile settings as the CLI.
- **CloudFormation, SAM and CDK:** stacks deploy to the Region of the credentials or profile you deploy with, or the one you pass with `--region`; a CDK app can also pin `env` per stack.
- **CloudShell** opens in the Region currently selected in the console.

## Check before relying on it

- **Scripts should be explicit.** Pass `--region` in automation so a colleague's default doesn't change what a script touches.
- **Unset stale variables.** A leftover `AWS_DEFAULT_REGION` from an old tutorial quietly overrides your profile. `env | grep AWS_` shows them.
- **Region codes, not names.** Use `eu-west-2`, not "London" or "eu-west-2a" (that's an Availability Zone). Codes are listed on pages such as [eu-west-2](https://cloudconsole.dev/regions/eu-west-2) and [us-east-1](https://cloudconsole.dev/regions/us-east-1).
- **Opt-in Regions** must be enabled for your account before you can use them.

## Common mistakes

- "I can't see my instance": it's in a different Region from the one the console or CLI is using.
- Setting the Region in `~/.aws/credentials`; it belongs in `~/.aws/config`.
- Expecting the SSO Region (`sso_region`) to set where commands run; it only says where IAM Identity Center lives.

## Questions

### What is the AWS CLI default Region if none is set?

There isn't one for most commands: the CLI asks you to specify a Region and fails with a "You must specify a region" error until you do.

### What is the difference between AWS_REGION and AWS_DEFAULT_REGION?

Both set the Region for the CLI. AWS_REGION is the variable shared with the AWS SDKs and takes precedence over AWS_DEFAULT_REGION when both are set.

### How do I see which Region the AWS CLI is using?

Run aws configure list. It shows the Region value and whether it came from an environment variable, the config file or nowhere.

## When this happens away from your desk

Being in the wrong Region is the most common reason something seems to have vanished. CloudConsole, a phone app for AWS, is built to keep Region and account visible on every screen.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Environment variables to configure the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)
- [Configuration and credential file settings in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)

## Related

- [aws configure](https://cloudconsole.dev/cli/configure)
- [How to switch between AWS profiles](https://cloudconsole.dev/how-to/switch-between-aws-profiles)
- [eu-west-2: Europe (London)](https://cloudconsole.dev/regions/eu-west-2)
- [us-east-1: US East (N. Virginia)](https://cloudconsole.dev/regions/us-east-1)
- [How to find all resources in all AWS Regions](https://cloudconsole.dev/how-to/find-resources-in-all-regions)
- [How to add my IP to an AWS security group](https://cloudconsole.dev/how-to/add-my-ip-to-security-group)

---

Source: https://cloudconsole.dev/how-to/change-default-aws-region

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
