In GenU, you can specify deployment options in the following two ways:
- Specifying in the context of cdk.json
- Specifying in parameter.ts (Recommended for new builds as it allows defining settings for multiple environments)
Please refer to Deployment Options for available deployment options.
Download the default cdk.json (you can download the file from the download button at the top right of the GitHub page) and modify the context section, then save the file.
Download the default parameter.ts and add the necessary environment settings. In parameter.ts, you can manage multiple environment settings like dev, staging, prod in a single file.
Launch CloudShell. If you have customized cdk.json or parameter.ts, upload the customized files from Upload file in the Actions menu at the top right.
Execute the following commands in CloudShell to download the deploy.sh
script.
After downloading, grant execution permissions to deploy.sh.
wget https://raw.githubusercontent.com/aws-samples/generative-ai-use-cases/refs/heads/main/deploy.sh -O deploy.sh
chmod +x deploy.sh
deploy.sh supports the following options:
-c, --cdk-context ... Path to the cdk.json file
-p, --parameter-file ... Path to the parameter.ts file
-e, --env ... Environment name (e.g., dev, prod)
-h, --help ... Show this message
Execute deploy.sh with the following commands. Note that the --cdk-context option specifies the path to the customized cdk.json. (For --parameter-file, it's the path to parameter.ts) If you uploaded files without any modifications as described earlier, this path will be used. If cdk.json or parameter.ts is in a different path, modify the argument value accordingly.
- Deploy with default settings:
./deploy.sh
- Deploy using a customized cdk.json:
./deploy.sh --cdk-context ~/cdk.json
- Deploy an unnamed environment using a customized parameter.ts:
./deploy.sh --parameter-file ~/parameter.ts
- Deploy specifying parameter.ts and environment:
./deploy.sh --parameter-file ~/parameter.ts --env prod
When deployment is complete, the CloudFront URL will be displayed. You can access GenU by opening that URL in a browser.
- If parameter.ts and environment are specified, and the environment name (including unnamed environments) is defined in parameter.ts, those settings have the highest priority
- cdk.json settings are applied next
Note that to execute these steps, you also need to enable the models from Amazon Bedrock Model access. Confirm that the models specified in modelIds, imageGenerationModelIds, and videoGenerationModelIds in the modelRegion of the configuration file (parameter.ts or cdk.json) are enabled.