Boilerplate code for rapidly creating ready-to-deploy Serverless Framework services.
- Install
npm install
rename .env.dist to .env, fill all information
- Create lambda or workflow
npm run plop
- docker-compose up
- npm install
- rename .env.dist to .env
- fill all information
- npm run run-migrations
- npm run dev
Serverless uses workers to run lambdas locally. To debug them in your IDE you need to add --useInProcess
flag, or run the following command:
npm run dev-with-debug
npm run start-workflow --workflow=NAME_OF_THE_WORKFLOW
To follow all the logs from the step function executions you can use the command:
npm run get-sf-logs
We support ASL for Step Functions. Make sure to install AWS Toolkit so you can render graph for step functions and validate its syntax easily.
Before deployment, please ensure that a related SonarQube project has been created. After that set proper repository variables (SONAR_TOKEN
and SONAR_HOST_URL
) and properties in sonar-project.properties
file.
The best choice for deployment is the bitbucket pipeline.
Deployment pipeline consist of two steps:
- compile (automated start)
- build
- run lambda offline
- run test
- deploy (user action required)
- https://serverless.com/framework/docs/providers/aws/guide/variables/
- https://serverless.com/framework/docs/providers/aws/cli-reference/config-credentials/
Here you can check example tests: handler.spec.ts
We use zod for schema validation.
If you notice any issues while using, let as know on github. Security issues, please send on email
This project is licensed under the terms of the MIT license.