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 config

Every 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_REGION in the environment (the JavaScript SDK reads AWS_REGION; the AWS CLI also honors AWS_DEFAULT_REGION and --region).
  • A region in ~/.aws/config the SDK never reads — the JavaScript SDK v2 only loads the shared config file when the AWS_SDK_LOAD_CONFIG environment variable is set; without it, a perfectly good region = line is ignored.
  • A typo in the env var name (AWS_REGIONS, REGION).

How to fix it (any one of these)

  1. Set it on the client (most explicit):
    import {DynamoDBClient} from '@aws-sdk/client-dynamodb';
    const client = new DynamoDBClient({region: 'us-east-1'});
  2. Environment variable:
    export AWS_REGION=us-east-1
  3. AWS config file (~/.aws/config):
    [default]
    region = us-east-1
    On the JavaScript SDK v2, also set AWS_SDK_LOAD_CONFIG=1 so the SDK actually reads this file (the CLI and most other SDKs read it by default).
  4. 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

References

Last verified 2026-07-13 against the official AWS documentation linked above.

Work with DynamoDB without the Console

A fast DynamoDB desktop client that runs the real SQL DynamoDB can’t — JOINs, GROUP BY, aggregates — with visual editing and an AI agent on your own Bedrock keys.

Free 30-day trial, no credit card — then the Free plan with no time limit.