# Error: pulumi:providers:aws resource 'default' has a problem: Missing region information

## TL;DR
The AWS provider has credentials but no region. Set it with `pulumi config set aws:region [region]` (or `AWS_REGION` in the environment) and re-run.

## The error

```
Diagnostics:
  pulumi:providers:aws (default):
    error: pulumi:providers:aws resource 'default_6_18_2' has a problem: Missing region information
    Make sure you have set your AWS region, e.g. `pulumi config set aws:region us-west-2`.
```

## Fix it

1. Set the region in stack config: `pulumi config set aws:region [region]` (e.g. `us-west-2`).
   - Success check: `pulumi config get aws:region` prints the value.
2. Or export it: `export AWS_REGION=[region]` (the provider also honors `AWS_DEFAULT_REGION`).
   - Success check: `pulumi preview` gets past provider configuration.
3. If you use profiles, you can also set the region in the profile in `~/.aws/config`.
   - Success check: `aws --profile [profile] configure get region` returns it.
4. Re-run `pulumi preview`.
   - Success check: the provider configures and resources preview.

## When to use this
You hit this when credentials are fine but no region is set anywhere the provider looks.

## When NOT to use this
Do not use this for credential errors (`No valid credential sources`, `Invalid credentials configured`, `ExpiredToken`). Those are about identity, not region.

## Compatibility
Pulumi CLI 3.x, Pulumi AWS provider v6.x.

## Variants
- `error: pulumi:providers:aws resource 'default' has a problem: Invalid credentials configured.` (credentials present but rejected)
- Region errors from the AWS SDK wrapped in provider diagnostics

## Root cause
The AWS provider requires a region for endpoint resolution. Unlike the AWS CLI, it does not always fall back to config-file regions, so an explicit `aws:region` is the reliable fix.

## Edge cases
- Multi-region stacks: set the default region and override per-provider with an explicit `Provider` resource carrying its own `region`.
- `AWS_REGION` beats stack config in some SDK paths; if the wrong region is used, check the environment first.
