Deployed to AWS with CDK, running on Lambda backed by DynamoDB
This app can be run locally for ease of development & debugging.
Running locally requires localstack.
- Install
localstack
$ pip3 install localstack
- Install
localcdk
(a wrapper for cdk that simplifies deployment of cdk stacks to localstack)
$ yarn global add aws-cdk-local
- Install
awslocal
(a wrapper for AWS cli that simplifies management of localstack resources)
$ pip3 install awscli-local
- Start localstack:
$ DEBUG=1 SERVICES=serverless,dynamodb localstack start
- Then, in a seperate terminal, bootstrap localstack (creates the staging area buckets, roles etc)
$ cdklocal bootstrap
- Deploy the stack:
$ cdklocal deploy --require-approval never
- To re-deploy the stack when either the stack definition or the app code changes, run
$ yarn watch:local
TODO: orchestrate localstack with docker-compose
This is a blank project for TypeScript development with CDK.
The cdk.json
file tells the CDK Toolkit how to execute your app.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template