This is an aws-cdk project where you can create a highly scalable asynchronous API with API Gateway and SQS which in turn invokes Lambda.
Inspired from this blog post.
- Rename the
.example.env
file to.env
and replace all the values with predefined values for your stack.
Note: All the variables are mandatory! Without that, the stack wouldn't work.
-
Run
yarn
(recommended) ornpm install
-
Run
yarn cdk deploy --profile profileName
to deploy the stack to your specified region. You can skip providing the profile name if it isdefault
.
The cdk.json
file tells the CDK Toolkit how to execute your app.
yarn watch
watch for changes and compileyarn test
perform the jest unit testsyarn cdk deploy
deploy this stack to your default AWS account/regionyarn cdk diff
compare deployed stack with current stateyarn cdk synth
emits the synthesized CloudFormation template