AWS & CDK evaluation project
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"sudo installer -pkg AWSCLIV2.pkg -target /
- Configure AWS CLI using the created access key
aws configure
brew install node # mac
sudo apt-get install nodejs # debian
- Install AWS CDK toolkit
npm install -g aws-cdk
- Install the target SDK/Runtime (in our case TypeScript)
npm install -g typescript
- open repository root folder
cd aws-snake
- install api node modules
(cd ./snake-api && npm install)
- build api project
(cd ./snake-api && npm run build)
- install cdk node modules
(cd ./snake-iac && npm install)
- deploy the CDK toolkit stack into an AWS environment
(cd ./snake-iac && cdk bootstrap)
- compare local and remote stack configs
(cd ./snake-iac && cdk diff)
- deploy the stack to AWS
(cd ./snake-iac && cdk deploy)
- Get application entry point
aws apigatewayv2 get-apis
- Access the game at
<ApiEndpoint>
returned byget-apis
command - Access swagger at
<ApiEndpoint>/swagger/
-
Fork this repository
-
Configure test and prod virtual environments
-
Configure forked repository with AWS secrets:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
-
Create a Github Action from ci-cd.yml file