Awesome
Example TypeScript Lambda
This is an example of a TypeScript lambda, using:
- NPM workspaces
- GitHub Actions for CI (view it here)
- Riff-Raff for CD (view it here)
- @guardian/tsconfig for TypeScript configuration
- @guardian/cdk for infrastructure
- @guardian/eslint-config-typescript for ESLint configuration
- @guardian/prettier for Prettier configuration
Logs appear in Central ELK.
It's quite opinionated, using:
The aim is for this to be a starting point for a new application. Note, however, that there is a risk the repository might need updating. For example, dependency versions, or Node version.
Usage
- Fork (or clone1) this repository
- Add your code to packages/lambda/src
- Deploy via Riff-Raff
You'll want to edit some parts of the infrastructure in packages/cdk to ensure the app is deployed to the desired AWS account.
You'll also want to update or remove the Dependabot auto-approve workflow, which keeps this repository up to date with dependencies but may not be suitable for a production lambda!
Footnotes
-
If cloning, you'll also want to update the remote url to match your repository ↩