ConfigError: Missing region in config
TL;DR — The AWS SDK doesn't know which region to talk to. Set it explicitly on the client (new DynamoDBClient({ region: 'us-east-1' })), or via the AWS_REGION environment variable, or in ~/.aws/config.
What it means
ConfigError: Missing region in configEvery DynamoDB endpoint is regional, so the SDK must resolve a region before it can send a request. This exact wording comes from the AWS SDK for JavaScript v2 (now end-of-support), which doesn't select a region by default — when none of its configuration sources supplies one, it throws this before any network call. Other SDKs and the AWS CLI fail with their own equivalent when no region is configured.
Why it happens
- No region passed to the client and no
AWS_REGIONin the environment (the JavaScript SDK readsAWS_REGION; the AWS CLI also honorsAWS_DEFAULT_REGIONand--region). - A region in
~/.aws/configthe SDK never reads — the JavaScript SDK v2 only loads the shared config file when theAWS_SDK_LOAD_CONFIGenvironment variable is set; without it, a perfectly goodregion =line is ignored. - A typo in the env var name (
AWS_REGIONS,REGION).
How to fix it (any one of these)
- Set it on the client (most explicit):
import {DynamoDBClient} from '@aws-sdk/client-dynamodb'; const client = new DynamoDBClient({region: 'us-east-1'}); - Environment variable:
export AWS_REGION=us-east-1 - AWS config file (
~/.aws/config):On the JavaScript SDK v2, also set[default] region = us-east-1AWS_SDK_LOAD_CONFIG=1so the SDK actually reads this file (the CLI and most other SDKs read it by default). - DynamoDB Local? It still needs a region string (any value — it's only used to name the local database file) plus an
endpoint:const client = new DynamoDBClient({region: 'local', endpoint: 'http://localhost:8000'});
Point DynoTable at Local
DynoTable stores region on each AWS profile — Settings → Profiles → Add Profile, then pick the region from the dropdown before you save. The profile chip at the bottom of the sidebar shows the active region; press ⌘P to switch. Test Connection fails fast when the region is blank or the shared config file is ignored by an SDK that needs AWS_SDK_LOAD_CONFIG.
For Local, use Download Local (or point the profile endpoint at http://localhost:8000) and set any region string — DynoTable keeps endpoint and region on the same profile so they cannot drift. Once connected, open a table with ⌘K and confirm the request goes to the region you expect. The visual query builder is useful to prove the profile region before you paste the same settings into application code.
When debugging SDK v2 vs v3 region resolution differences, compare the profile settings DynoTable uses against your application's env vars side by side. Staging (⌘S) lets you test a write against the configured profile before your batch job runs.
Sources
- Setting the AWS Region — AWS SDK for JavaScript v2 (verified 2026-07-13)
- Troubleshooting errors for the AWS CLI (verified 2026-07-13)
Related errors
- The security token is invalid
- ResourceNotFoundException — often a region mismatch once a region is set.
- Unable to start DynamoDB Local process
- Learn: Connect to DynamoDB Local & LocalStack
References
- Setting the AWS Region — AWS SDK for JavaScript v2 Developer Guide
- Troubleshooting errors for the AWS CLI — AWS CLI User Guide
- DynamoDB local usage notes — Amazon DynamoDB Developer Guide
Last verified 2026-07-13 against the official AWS documentation linked above.