Destroy
Use the same account/region session as deploy (AWS_PROFILE, AWS_REGION, CDK_DEFAULT_*).
App stack
Section titled “App stack”Remove the app stack when finished with the demo account/region. This also deletes resources CDK created for the Coach:
- Cognito user pool (owner UI)
- DynamoDB run-history table (if enabled)
- Amplify app/branch
- API Gateway + Lambda (+ API key / usage plan)
npx cdk destroy PrReadinessCoachStack --forceGitHub secrets (PR_READY_API_URL, PR_READY_API_KEY, …) are not deleted automatically — remove or rotate them in the repo settings if you are done with the demo.
Optional: CDK bootstrap leftovers
Section titled “Optional: CDK bootstrap leftovers”Only if you do not need further CDK deploys in this account/region. Bootstrap created toolkit stack CDKToolkit and assets bucket cdk-hnb659fds-assets-<account>-<region> (unless you customized the qualifier).
aws cloudformation delete-stack --stack-name CDKToolkitaws cloudformation wait stack-delete-complete --stack-name CDKToolkitThen empty and delete the assets bucket if it remains:
ACCOUNT=$(aws sts get-caller-identity --query Account --output text)BUCKET="cdk-hnb659fds-assets-${ACCOUNT}-${AWS_REGION}"aws s3 rm "s3://${BUCKET}" --recursiveaws s3 rb "s3://${BUCKET}"