aws-amplify / aws-amplify/docs
[Gen 2] Add additional callouts about resource provisioning and disposition in sandbox mode
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
**Describe the content issue**:
In sandbox mode, it is expected behavior that a DDB table will be deleted and recreated if the customer makes a GSI updates. However, our [sandbox documentation](https://docs.amplify.aws/javascript/deploy-and-host/sandbox-environments/setup/) could use some callouts about this. (I’m assuming they don’t already exist; I wasn’t able to find any notes about this, in any case).
We have some [best practices](https://docs.amplify.aws/javascript/deploy-and-host/sandbox-environments/setup/#best-practices) on that page, but nothing specifically calling out that there are some resource provisioning behaviors that are intentionally different between branch and sandbox environments. Off the top of my head, I know of:
* DynamoDB GSI operations are long-running. Therefore in a sandbox, when a customer deletes or modifies an index on a DynamoDB table, we drop the table and recreate it rather than modifying the GSI.
* Where supported, we use [CDK hot swapping](https://docs.aws.amazon.com/cdk/v2/guide/cli.html#cli-deploy-hotswap) to speed deployment of resources such as Lambda functions and AppSync resolver templates
* When the customer makes an unsupported change to their Cognito User Pool (e.g., deleting a required field), we drop the user pool and recreate it
There may be other differences that escape me for the moment, but these and other optimizations are all in support of the sandbox's primary mission: to allow rapid local development in an ephemeral environment.
Customers can of course use per-developer branches to exactly replicate "production" behavior.
**URL page where content issue is**: https://docs.amplify.aws/javascript/deploy-and-host/sandbox-environments/setup
Contributor guide
Assessment
This issue has not been assessed yet.