As of 2022-11-14 this project is no longer maintained. If you plan to build your project based on this code, please, make sure it contains safe dependencies and that it is up-to-date with the latest best security practices.
An example AWS CDK stack that deploys HTTP API with Javascript Lambda.
The AWS CDK stack is at cdk
folder.
Javascript Lambda code is at lambda
folder.
Please, follow Getting Started guide at https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html to set up your environment.
- Go to
lambda
folder - Run
npm install
- Run
npm run build
to build the lambda source code
- Go to
cdk
folder - Run
npm install
- Run
npm run build
- Run
npm run cdk deploy
- Run
curl https://<HTTP API>.execute-api.<AWS Region>.amazonaws.com/v1/ping
- You can find the exact URL as the
PingURL
stack output variable
- Run
npm run cdk destroy
Apache License, Version 2.0. See LICENSE.txt for more details.
Copyright 2020 New Town Data Ltd, https://www.newtowndata.com/