Write config.json to S3 with AWS CDK
To make prebuilt SPA installers with CDK I like to keep environment configuration outside of the minified code via a config.json file. This allows me to build the app once and move it between environments and stages.