Amplify gives every developer a personal cloud sandbox environment that provides isolated development spaces to rapidly build, test, and iterate on a fullstack app. You and each developer on your team gets their own disposable sandbox environment connected to cloud resources.
You can set up a new sandbox environment on your machine once you have an Amplify app set up. If you have not yet created an Amplify (Gen 2) app, visit the Quickstart.
First, open the terminal and run the following command:
1npx amplify sandbox
When you deploy a cloud sandbox, Amplify creates an AWS CloudFormation stack following the naming convention of
amplify-<app-name>-<$(whoami)>-sandbox in your AWS account with the resources configured in your
After a successful deployment,
sandbox watches for file changes in your
amplify/ folder and performs real-time updates to the associated CloudFormation stack. This functionality is built leveraging the hot swap capability of the AWS Cloud Development Kit (CDK).
After testing all the changes associated with the backend, you can terminate the sandbox session via Ctrl+c and can then choose whether you want to keep or delete all the resources in the sandbox environment.
You can view and manage all the sandbox environments for your team in the new Amplify console. This is useful for a team leader to audit all of the Amplify sandbox environments deployed within an account.
Choose Manage Sandboxes to get started:
You can then check the number, status, and last updates for sandbox environments across your team. You can also use the console to delete sandbox environments when no longer needed.
Keep the following best practices in mind when working with cloud sandbox environments:
- Sandboxes are identical in fidelity to your production environments.
- Code changes are continuously deployed to your sandbox on every save for fast iterations.
- Use sandboxes for experimentation and testing, not for production workloads.
- Deploy one sandbox per Amplify app to prevent conflicts.
- Reset sandboxes occasionally to clear out unused resources and save costs.