Launch Settings
Using launch templates, managers can define what resources need to be set up on new accounts creation. For instance, create S3 buckets, deploy Cloud Formation templates, etc.
- In
SandboxorderStudio,to user Launch templates, select Launch resource in accounts (1) - In the event that you want some ideas, you can select in the Need Inspiration section the Select a launch template (2) option and a number of example launch templates will be displayed. If you select one of these, the script fields below will be automatically populated to launch the selected resources.
Alternatively you could create your own scripts, by completing the 3 fields:
- (1) Download files from S3: Optional - Enter an S3 path (e.g., s3://my-bucket/setup-files/) to download files before the process starts. Useful for including config files, scripts, or other resources. Files will be downloaded to the /tmp directory.
- (2) Setup Script: Optional - Shell commands to run before the launch
templatescript.usesUseAWSthisCodeBuild.toCodeBuildinstallspinstools like Terraform, configure the environment, or prepare files. -
(3) Launch Script: Shell commands that run during the launch process. This is where you define the actual scripts that set up
ayourbuildAWSserveraccount.and
- Having completed all the
stepsfieldsdefined in abuildspecYAML file.Duringon thecreationLaunchofSettingsapageleaseastemplate,needed,theclickmanagerondefines the CodeBuild buildspec.yaml file:Examples:
toIn this section, we list a few examples of CodeBuild buildspec yaml file that you can useNext tocreatemoveresources.Creatingsectionresources using the AWS CLI:This example creates an S3 bucket in the us-east-1 region:version:0.2phases:build:commands:- ReviewechoCreating S3 bucket...-BUCKET_NAME=my-sample-bucket-$(date +%s)-aws s3 mb s3://$BUCKET_NAME --region us-east-1-echo"Bucket $BUCKET_NAME created."Creating resources using the AWS CloudFormation:xxxxCreating resources using the AWS Terraform:xxx