Skip to content

Base template for Serverless Framework applications

Notifications You must be signed in to change notification settings

0xBABA/sls-base

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base Serverless Framework Template

What's included

  • 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.

Getting started

sls create --name YOUR_PROJECT_NAME --template-url https://github.com/0xBABA/sls-base
cd YOUR_PROJECT_NAME
yarn install

Notes

  • 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!

About

Base template for Serverless Framework applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%