AWS Fargate built using AWS-CDK.
npm run build
compile typescript to jsnpm run watch
watch for changes and compile. Leave this running in one terminal whilst developingnpm run test
perform the jest unit testscdk deploy <stackName> --profile <AWS profile name> -c stage=<stage>
deploy this stackcdk destroy <stackName> --profile <AWS profile name> -c stage=<stage>
destroy this stackcdk diff <stackName> --profile <AWS profile name> -c stage=<stage>
compare deployed stack with current statecdk synth <stackName> --profile <AWS profile name> -c stage=<stage>
emits the synthesized CloudFormation templatecdk list --profile <AWS profile name> -c stage=<stage>
lists available Stacks
If you only have one AWS profile setup in ~/.aws/credentials
then you do not need to add --profile <AWS profile name>
in the above cdk
commands.
The Fargate stack requires stage configuration so commands require -c stage=<stage>
e.g.
cdk list -c stage=dev
StudySyncFargateALB
- Node and npm. Refer to
.nvmrc
for Node version - Optional: Node Version Manager
- Typescript
- AWS CDK
- AWS User/Role with appropriate IAM permissions to run
cdk
commands
Update the configuration files in ./config
, in particular config/default.yaml
add your AWS account ID and change the region if required.
Run these commands from the project root:
npm install
# one time command to bootstrap CDK environment
cdk bootstrap --profile <AWS profile name>