Deploy manually with CloudFormation
Updated · 6 min read
The installer is the quickest way to install Sandbox Studio. If your organisation needs to deploy through its own pipeline or review every stack before it runs, you can deploy the same CloudFormation templates yourself. This page lists the stacks, the parameters to give each one, and the few settings to finish by hand.
Before you start#
Accounts: you deploy one stack in the organisation's management account and five in the hub account. See Choosing the hub account. The management account can also be the hub.
Region: deploy every stack in the same region, your home region. See Choosing your region(s).
Namespace: pick a name of 3–8 letters or numbers (the default is
Sandbox). Every stack must use the same one.Stack names: use the names below exactly. The installer looks for them when you update later.
Capabilities: each stack needs
CAPABILITY_NAMED_IAMandCAPABILITY_AUTO_EXPAND. In the console, tick the acknowledgements on the last page.
The templates for each release are published here (replace 1.3.1 with the version you are installing):
https://sandbox-studio-software-dist.s3.amazonaws.com/versions/1.3.1/SandboxStudio-<Stack>.template.jsonTo find the latest version, open latest.json.
1. Deploy the stacks#
Deploy them one at a time, in this order, and wait for each to finish before starting the next. Later stacks read settings that earlier ones publish.
Order | Stack name | Account | Typical time |
|---|---|---|---|
1 |
| Management | 1 minute |
2 |
| Hub | 3 minutes |
3 |
| Hub | 20 minutes |
4 |
| Hub | 2 minutes |
5 |
| Hub | 4 minutes |
6 |
| Hub | 8 minutes |
Leave any parameter not listed below at its default.
SandboxStudio-AccountPool (management account)#
Parameter | Value |
|---|---|
| Your namespace. |
| The hub account's 12-digit ID. |
| Where Sandbox Studio creates its organisational units: your organisation's root ID ( |
| The regions users may work in, comma-separated, for example |
SandboxStudio-Networking (hub account)#
Parameter | Value |
|---|---|
| Your namespace. |
|
|
| Only with your own VPC: private subnets with internet access for the functions, and isolated private subnets for the database. See Bringing your own VPC. |
SandboxStudio-Data (hub account)#
Parameter | Value |
|---|---|
| Your namespace. |
| The management account's ID. |
| Leave empty. |
|
|
|
|
| Any value, for example today's date. See Updating later. |
SandboxStudio-Cognito (hub account)#
Parameter | Value |
|---|---|
| Your namespace. |
| The same value as the Data stack. |
Leave the group name parameters and PreserveUserPoolConfigOnUpdate at their defaults.
SandboxStudio-Compute (hub account)#
Parameter | Value |
|---|---|
| Your namespace. |
| The management account's ID. |
| Leave empty. |
| The same value as the Data stack. |
SandboxStudio-API (hub account)#
Parameter | Value |
|---|---|
| Your namespace. |
| The management account's ID. |
| Leave empty. |
| IPv4 ranges allowed to reach Sandbox Studio, comma-separated. The default allows everyone. See Restricting access with IP allow lists. |
|
|
| Optional custom domain, such as |
| The same value as the Data stack. |
When the API stack finishes, note its CloudFrontDistributionUrl and ApiGatewayUrl outputs. Your web app URL is your custom domain (https://sandbox.example.com) or, without one, the CloudFront URL.
2. Point sign-in at your web app#
Cognito needs to know where to send people back after they sign in.
In the hub account, open Amazon Cognito and select the user pool named in the UserPoolId output of
SandboxStudio-Cognito.Open the app client named in the AppClientId output, and edit its login pages settings.
Replace the placeholder Allowed callback URLs with:
<web app URL>/api/auth/callback<ApiGatewayUrl>auth/callback(the ApiGatewayUrl output already ends in/prod/)If you use a custom domain, also
<CloudFront URL>/api/auth/callback
Replace the placeholder Allowed sign-out URLs with your web app URL (and the CloudFront URL if you use a custom domain).
Save the changes. Leave every other app client setting as it is.
3. Set the web app URL in AppConfig#
In the hub account, open AWS AppConfig and choose the application named in the ConfigApplicationId output of
SandboxStudio-Data.Open the GlobalConfig configuration profile and create a new hosted configuration version, starting from the current one.
Under
auth, setwebAppUrlto your web app URL:auth: webAppUrl: https://sandbox.example.comDeploy the new version to the environment in the ConfigEnvironmentId output, using the strategy in the ConfigDeploymentStrategyId output.
Note the version number. You come back to it in the next step.
4. Create the first administrator#
The installer adds the first administrator straight into the database, which you can't reach from outside the VPC. Instead, you briefly let people from your email domain sign up with the administrator role, sign up yourself, then switch it off again.
In the same GlobalConfig profile, create another version with these values under
auth.email, and deploy it:auth: email: enabled: true allowUninvitedSignIn: true allowedDomains: - example.com defaultRole: adminOpen your web app URL, enter your work email and choose Continue. Enter the code that's emailed to you, then add your name and a password to create your account. You are signed in as an administrator.
Straight away, deploy the version you created in step 3 again. This turns sign-up without an invitation back off and puts the default role back to
user.Sign out and back in to check your access, then invite your other administrators from Users & Groups. See Inviting users.
5. Finish setting up#
Sign in and carry on from the welcome checklist, the same as after the installer: register your product key, set up email, add sandbox accounts and create your first template. See What you see first and Post-deployment configuration tasks.
Email delivery is set in the app under Settings, then Email Settings, so you don't need to edit AppConfig or Secrets Manager for it. Amazon SES needs a verified sender either way. See Configure email sending.
Updating later#
You have two options:
Use the installer. Run it from the management account as described in Update Sandbox Studio. It finds the stacks by name and updates them in place, keeping your settings.
Update the stacks yourself, in the same order as above, with the new version's template URLs. Give
DeployNoncea new value on every update (for example, the date and time). It makes the stacks pick up settings from the stacks before them, which they otherwise skip when only the template changes.
If something goes wrong#
A stack fails to create: open its Events tab for the first failure, fix the cause, delete the failed stack and create it again. The most common causes are missing prerequisites (StackSets or RAM trusted access, Lambda concurrency) and a namespace that doesn't match the earlier stacks.
Sign-in returns you to an error page: check the callback URLs in step 2 and the
webAppUrlin step 3. They must match the address in your browser exactly, includinghttps://."You need an invitation to sign in" during step 4: the configuration from step 4 isn't deployed yet, or your email domain isn't in
allowedDomains. AppConfig deployments can take a few minutes.
See also Troubleshooting the installation.



