aws-amplify / aws-amplify/amplify-cli

Flag environments as "production" to enable special deletion protections

Open
#10,781 2 comments 5 reactions 0 assignees View on GitHub
feature-request p4 platform-config
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Is this feature request related to a new or existing Amplify category?

storage, api

### Is this related to another service?

_No response_

### Describe the feature you'd like to request

To prevent unintentional deletion of production data, Amplify could allow certain environments to be marked as "production" environments. Production environments should have certain protections that other environments don't have. Namely, all stateful resources (s3 buckets, dynamodb tables, perhaps opensearch clusters) should require additional confirmation to delete. This will help prevent data loss if commands like `amplify env remove` or `amplify storage remove` are accidentally run in the wrong environment.

### Describe the solution you'd like

Be able to configure an environment as a production environment. Perhaps a command like `amplify update env --is-production=true` Once an environment is marked as production, any action that would delete data in that environment should require a `--delete-production-data` flag. Additional protections could also be added to production environments such as not being able to perform any removal action without specifying a certain flag

### Describe alternatives you've considered

Putting production environments in a different AWS account from development resources mitigates some of this risk, but it is still possible that a developer may inadvertently use the wrong credentials when running the CLI. This can be further mitigated by only giving CI/CD environments the credentials to the production account.

### Additional context

_No response_

### Is this something that you'd be interested in working on?

- [ ] 👋 I may be able to implement this feature request

### Would this feature include a breaking change?

- [ ] ⚠️ This feature might incur a breaking change

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.