- Folder structure used consistently across our projects.
- Preparation for AWS X-RAY tracing
- pino-lambda: Pino based logger for AWS lambda functions
- serverless-pseudo-parameters plugin: Allows you to take advantage of CloudFormation Pseudo Parameters.
- serverless-bundle plugin: Bundler based on the serverless-webpack plugin - requires zero configuration and fully compatible with ES6/ES7 features.
- serverless-iam-roles-per-function plugin: A Serverless plugin to easily define IAM roles per function via the use of iamRoleStatements at the function definition block.
- serverless-export-env plugin: A serverless plugin to easily export env vars defined in serverless.yml to a distinct .env file and automatically include these in local invocations.
sls create --name YOUR_PROJECT_NAME --template-url https://github.com/0xBABA/sls-base
cd YOUR_PROJECT_NAME
yarn install
- to enable tracing you must also enable capturing traces in your code (outside of lambda handlers):
const awsXRay = require('aws-xray-sdk');
const awsSdk = awsXRay.captureAWS(require('aws-sdk'));
You are ready to go!