Aws elastic container service with blue/green deployment.
aws secretsmanager create-secret --name demoapp/gitSourcetoken --secret-string <GITHUB_TOKEN>
Or
aws secretsmanager update-secret --secret-id demoapp/gitSourcetoken --secret-string <GITHUB_TOKEN>
export AWS_ACCESS_KEY_ID=<XXXX>
export AWS_SECRET_ACCESS_KEY=<XXXX>
export AWS_DEFAULT_REGION=<XXXX>
"settings": {
"applicationName": "<App Name>",
"familyName": "<Family Name>",
"clusterName": "<Cluster Name>"
},
// React app source code
"project_source": {
"branch": "main",
"owner": "<OWNER>",
"repo": "<REPO>",
"secretToken": "<setup in next step>",
},
// Cdk infrastructure code
"cdk_source": {
"branch": "main",
"owner": "<OWNER>",
"repo": "<REPO>",
"secretToken": "<setup in next step>",
}
- Install
npm install
- deploy
cdk deploy
On Initial Deployment: Cdk pipeline will fail to prevent repeate deployment
alias cdk="npx aws-cdk"