aws-amplify / aws-amplify/amplify-cli

Cannot Create New Environment: "Cannot read properties of undefined (reading 'Region')" – CLI Bug

Open
#14,244 5 comments 0 reactions 0 assignees View on GitHub
pending-response
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### How did you install the Amplify CLI?

npm install -g @aws-amplify/cli

### If applicable, what version of Node.js are you using?

v20.19.3

### Amplify CLI Version

14.0.0

### What operating system are you using?

macOS Sequoia 15.5

### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made to cloud resources. Only attempted local config edits as part of troubleshooting.

### Describe the bug

I am unable to create a new Amplify environment using the CLI. Every attempt to run amplify env add fails with the error:
🛑 Cannot read properties of undefined (reading 'Region')

This happens regardless of authentication method (Amplify Studio, AWS profile, or access keys), and after reducing team-provider-info.json to only the master environment with the correct region.

### Expected behavior

A new environment should be created and listed by the CLI, allowing safe development and testing.

### Reproduction steps

Clone the repo and ensure only the master environment exists in team-provider-info.json.
Run amplify env add in the project root.
Enter a new environment name (e.g., ai).
Select awscloudformation as the provider.
Select any authentication method.
Observe the error.

Image

### Project Identifier

31e6e3d41503af3131abab17046800d7

### Log output

```
# Put your logs below this line
🛑 Cannot read properties of undefined (reading 'Region')

Session Identifiers:
- f5d770da-00bb-42b1-9091-9b83b07a9933
- a22fc270-c2df-4476-b4fe-d786abb2bb06

```

### Additional information

Amplify AppId: d20z0issneg3fj
Region: eu-west-1
amplify env list only shows master
The Amplify Console does not show a "Create new environment" option for this app.
Tried all workarounds in [issue #12493](vscode-file://vscode-app/Users/admin/Desktop/Visual%20Studio%20Code%202.app/Contents/Resources/app/out/vs/code/electron-sandbox/workbench/workbench.html) and more.
This is blocking all feature development and safe testing for my production SaaS app with paying customers.

### Before submitting, please confirm:

- [x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [x] I have removed any sensitive information from my code snippets and submission.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `amplify env add` in the project root with only the master environment in `team-provider-info.json`, using Amplify CLI 14.0.0 on Node.js v20.19.3. Compare the result across the authentication methods listed and inspect the environment-provider configuration involved. Done means a new environment is created and appears in `amplify env list` without the undefined `Region` error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, node.js, typescript
Domain
cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.