Non-interactive installation (Configuration file)
Non-interactive installation (Configuration file)
Introduction
Sandbox Studio can be installed in two ways:
- Interactive mode: you run the installation script and answer each prompt as the wizard guides you through the setup. This is described in Running the Installation Wizard.
- Non-interactive mode: you provide all of the required settings up front in a JSON configuration file and pass it to the script with the
--config-fileflag. The installer reads every value from the file and runs the entire deployment without asking any questions.
Non-interactive mode is useful when you want repeatable, scripted, or unattended installations (for example in CI/CD pipelines, or when deploying the same configuration across multiple environments).
The configuration file drives exactly the same deployment as the interactive wizard. Every value you would normally be asked for in the wizard has a matching field in the configuration file.
Installing with the script and a configuration file
You can run the installer from any terminal, including AWS CloudShell, your local machine, or a build agent, as long as it meets the requirements below.
Before you begin, make sure your terminal is:
- Authenticated to your AWS Organisation Management account (for example via
aws configure, environment variables, an SSO profile, or an assumed role).
Do not use your root account.
- Targeting the AWS region where you want to install Sandbox Studio (for example by setting
AWS_REGION/AWS_DEFAULT_REGIONor your CLI profile's default region).
You can confirm which account and region your terminal is using with:
aws sts get-caller-identity
aws configure get region
Then run the installation:
- Create your configuration file somewhere on the machine running the installer. For example, create a file called
sbs-config.jsonin your home directory:
nano ~/sbs-config.json
Paste your configuration (see the example configuration files below), then save and exit. You can use any text editor; nano is just an example.
- Run the installation script and point it at your configuration file:
bash <(curl -s https://dist.sandboxstudiosoftware.com/install.sh) --config-file ~/sbs-config.json
The installer will load every value from the file and deploy the solution without prompting. Because no questions are asked, make sure your file is complete and correct before you run the command.
Using a configuration file to update Sandbox Studio
The same command is used to update an existing installation. When the script runs with a configuration file and detects an existing Sandbox Studio installation, it automatically upgrades all deployed stacks, with no confirmation prompts. Point the --config-file flag at your file exactly as you would for a first-time install:
bash <(curl -s https://dist.sandboxstudiosoftware.com/install.sh) --config-file ~/sbs-config.json
For more details on the update behaviour, see Update Sandbox Studio.
The configuration file
The configuration file is a single JSON object. The sections below describe every field, whether it is required, its default value, and what it does.
Required fields
These fields must always be present in the configuration file.
namespace`namespace``^[0-9a-zA-Z]{3,8}$`). Used as a prefix to name Sandbox Studio resources. Example: Sandbox`Sandbox`.hub_account_id`hub_account_id``^[0-9]{12}$`).parent_ou_id`parent_ou_id``ou-xxxx-xxxxxxxxxxxxxxxx` or a root ID such as `r-xxxxxxxx`.managed_regions`managed_regions``us-east-11` is always included automatically. Example: `us-east-1,eu-west-1,ap-southeast-22`.admin_group_name`admin_group_name`Sandbox_AdminsGroup`Sandbox_AdminsGroup`.manager_group_name`manager_group_name`Sandbox_ManagersGroup`Sandbox_ManagersGroup`.user_group_name`user_group_name`Sandbox_UsersGroup`Sandbox_UsersGroup`.allowed_ip_ranges`allowed_ip_ranges``0.0.0.0/1,128.0.0.0/11` (all IPs). Restrict to your corporate ranges if required.use_existing_vpc`use_existing_vpc`true`true`) or create a new one (false`false`).notifications_enabled`notifications_enabled`Database options
db_instance_type`db_instance_type``db.` prefix. Default: `t4g.smallsmall`. Examples: `t4g.smallsmall`, `t4g.mediummedium`, `r6g.largelarge`.db_engine_version`db_engine_version``X.YY`, major version 17 or higher). Leave empty (`""`) to use the latest default. Example: `17.44`.db_encryption`db_encryption`Yes`Yes` or No`No`. Default: Yes`Yes` for new installations.Identity Center application
You must provide either an existing application ARN (idc_app_arn) or a name for a new application (idc_app_name). If idc_app_arn is not supplied, a new SAML application is created using idc_app_name and idc_app_description.
idc_app_arn`idc_app_arn``arn:aws:sso::123456789012:application/ssoins-xxxxxxxxxxxxxxxx/apl-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`.idc_app_name`idc_app_name``Sandbox StudioStudio`.idc_app_description`idc_app_description``Sandbox Studio allows users to access temporary AWS accountsaccounts`.Networking (VPC)
When use_existing_vpc is true, the following three fields become required. When use_existing_vpc is false, a new VPC is created and these fields are ignored.
vpc_id`vpc_id`use_existing_vpc`use_existing_vpc` is true`true``vpc-0123456789abcdef00123456789abcdef0`.database_subnets`database_subnets`use_existing_vpc`use_existing_vpc` is true`true``subnet-aaa,subnet-bbbbbb`.compute_subnets`compute_subnets`use_existing_vpc`use_existing_vpc` is true`true``subnet-ccc,subnet-dddddd`.Custom domain
custom_domain`custom_domain`null`null` to use the default CloudFront URL. Example: `sandbox.example.comcom`.certificate_arn`certificate_arn`custom_domain`custom_domain` is set`us-east-11`. Example: `arn:aws:acm:us-east-1:123456789012:certificate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxxxxx`.Administrators
add_admin_users`add_admin_users`false`false`.admin_users`admin_users`add_admin_users`add_admin_users` is true`true`. Example: `["admin@example.com", "john.doe"]`.Email notifications
When notifications_enabled is true, email_service and email_from are required. If email_service is set to SMTP, the SMTP fields below also become required.
email_service`email_service`notifications_enabled`notifications_enabled` is true`true`SES`SES` or SMTP`SMTP`. Default: SES`SES`.email_from`email_from`notifications_enabled`notifications_enabled` is true`true``sandboxstudio@example.comcom`.smtp_server`smtp_server`email_service`email_service` is SMTP`SMTP``smtp.example.comcom`.smtp_username`smtp_username`email_service`email_service` is SMTP`SMTP`smtp_password`smtp_password`email_service`email_service` is SMTP`SMTP`smtp_port`smtp_port`email_service`email_service` is SMTP`SMTP`587`587`.smtp_use_tls`smtp_use_tls`email_service`email_service` is SMTP`SMTP`true`true`.\*\*Security:\*\* When you use the `SMTP` email service, the configuration file contains your SMTP`smtp_password` in plain text. Do not commit this file to source control and do not share it. Delete it once the installation is complete, and store any long-lived copy securely.smtp_password
Example configuration files
The examples below use placeholder account IDs, VPC IDs, and subnet IDs. Replace them with your own values.
Example 1: New VPC with SES notifications
{
"namespace": "Sandbox",
"hub_account_id": "123456789012",
"parent_ou_id": "ou-xxxx-xxxxxxxx",
"managed_regions": "us-east-1,eu-west-1",
"db_instance_type": "t4g.small",
"db_engine_version": "",
"idc_app_name": "Sandbox Studio",
"idc_app_description": "Sandbox Studio allows users to access temporary AWS accounts",
"admin_group_name": "Sandbox_AdminsGroup",
"manager_group_name": "Sandbox_ManagersGroup",
"user_group_name": "Sandbox_UsersGroup",
"allowed_ip_ranges": "0.0.0.0/1,128.0.0.0/1",
"use_existing_vpc": false,
"custom_domain": null,
"notifications_enabled": true,
"add_admin_users": true,
"admin_users": ["admin@example.com"],
"email_service": "SES",
"email_from": "sandboxstudio@example.com"
}
Example 2: Existing VPC, no notifications
{
"namespace": "SBS",
"hub_account_id": "123456789012",
"parent_ou_id": "ou-xxxx-xxxxxxxx",
"managed_regions": "us-east-1,ap-southeast-1",
"db_instance_type": "t4g.small",
"db_engine_version": "",
"idc_app_name": "Sandbox Studio",
"idc_app_description": "Sandbox Studio allows users to access temporary AWS accounts",
"admin_group_name": "Sandbox_Admins",
"manager_group_name": "Sandbox_Managers",
"user_group_name": "Sandbox_Users",
"allowed_ip_ranges": "0.0.0.0/1,128.0.0.0/1",
"use_existing_vpc": true,
"vpc_id": "vpc-0123456789abcdef0",
"database_subnets": "subnet-0aaaa1111bbbb2222,subnet-0cccc3333dddd4444",
"compute_subnets": "subnet-0eeee5555ffff6666,subnet-07777gggg8888hhhh",
"custom_domain": null,
"notifications_enabled": false,
"add_admin_users": true,
"admin_users": ["admin-trial", "andy"]
}
Example 3: Email notifications with SES
This example enables email notifications using Amazon SES. The email_from address must be a verified identity in SES.
{
"namespace": "Sandbox",
"hub_account_id": "123456789012",
"parent_ou_id": "ou-xxxx-xxxxxxxx",
"managed_regions": "us-east-1,eu-west-1",
"db_instance_type": "t4g.small",
"db_engine_version": "",
"idc_app_name": "Sandbox Studio",
"idc_app_description": "Sandbox Studio allows users to access temporary AWS accounts",
"admin_group_name": "Sandbox_AdminsGroup",
"manager_group_name": "Sandbox_ManagersGroup",
"user_group_name": "Sandbox_UsersGroup",
"allowed_ip_ranges": "0.0.0.0/1,128.0.0.0/1",
"use_existing_vpc": false,
"custom_domain": null,
"notifications_enabled": true,
"email_service": "SES",
"email_from": "sandboxstudio@example.com"
}
Example 4: Email notifications with SMTP
This example enables email notifications using an SMTP server. When email_service is set to SMTP, all of the smtp_* fields are required.
{
"namespace": "Sandbox",
"hub_account_id": "123456789012",
"parent_ou_id": "ou-xxxx-xxxxxxxx",
"managed_regions": "us-east-1,eu-west-1",
"db_instance_type": "t4g.small",
"db_engine_version": "",
"idc_app_name": "Sandbox Studio",
"idc_app_description": "Sandbox Studio allows users to access temporary AWS accounts",
"admin_group_name": "Sandbox_AdminsGroup",
"manager_group_name": "Sandbox_ManagersGroup",
"user_group_name": "Sandbox_UsersGroup",
"allowed_ip_ranges": "0.0.0.0/1,128.0.0.0/1",
"use_existing_vpc": false,
"custom_domain": null,
"notifications_enabled": true,
"email_service": "SMTP",
"email_from": "sandboxstudio@example.com",
"smtp_server": "smtp.example.com",
"smtp_username": "smtp-user",
"smtp_password": "your-smtp-password",
"smtp_port": "587",
"smtp_use_tls": true
}
Example 5: Custom domain with an ACM certificate
This example serves Sandbox Studio from a custom domain instead of the default CloudFront URL. When custom_domain is set, certificate_arn is required and the certificate must exist in us-east-1.
{
"namespace": "Sandbox",
"hub_account_id": "123456789012",
"parent_ou_id": "ou-xxxx-xxxxxxxx",
"managed_regions": "us-east-1,eu-west-1",
"db_instance_type": "t4g.small",
"db_engine_version": "",
"idc_app_name": "Sandbox Studio",
"idc_app_description": "Sandbox Studio allows users to access temporary AWS accounts",
"admin_group_name": "Sandbox_AdminsGroup",
"manager_group_name": "Sandbox_ManagersGroup",
"user_group_name": "Sandbox_UsersGroup",
"allowed_ip_ranges": "0.0.0.0/1,128.0.0.0/1",
"use_existing_vpc": false,
"custom_domain": "sandbox.example.com",
"certificate_arn": "arn:aws:acm:us-east-1:123456789012:certificate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"notifications_enabled": false
}
Support
If you encounter any issues, please contact your Sandbox Studio support team at support@sandboxstudiosoftware.com or go to https://support.sandboxstudiosoftware.com.