Skip to content

Microservice are design to be small, easy to deploy and fast to create without the overhead of setting up. This template is design to solve just that!

Notifications You must be signed in to change notification settings

M1chaelTran/lambda-microservice-template

Repository files navigation

Lambda Microservice Template

Microservice are designed to be small, easy to deploy and fast to create without the overhead of setting up. This template is design to solve just that!

Features

  • Utilising an existing proven and community driven serverless framework
  • Write Lambda using ES6/7 with Webpack bundling
  • Can run and test locally without having an AWS account
  • Easily integrate with any CI platforms
  • Hot reload and server side debugging

Getting started

  1. Fork or clone this repo
  2. npm i -g serverless to install serverless to your global npm
  3. Run yarn to install all the required modules
  4. Add your function(s) into the functions folder
  5. Add those function(s) to webpack.config.js entry
  6. Update the serverless.yml functions section to match with the changes
  7. Run yarn start to run all the functions locally
  8. Open the browser and navigate to the lambda function (eg. http://localhost:8000/first)

Deploying your functions to AWS

This is currently being setup through circleci to deploy automatically on merge to the dev and master branch If you however want to manually deploy it, then you'll need the following

  1. AWS credential setup
  2. serverless deploy --stage test --region ap-southeast-1 to deploy. Alternatively, yarn bundle to package the lambda functions into dist folder

Contribute are welcome

Todo

  • More documentation
    • Quick start
    • Working with Dynamodb
    • Serverless configuration
    • AWS deploy/release
    • More examples
Look out for other examples that spawn from this template
  • Dynamodb examples
  • Scheduler examples
  • IoT examples
  • Kinesis example
  • Graphql examples
  • Machine Learning
More details can be found at

About

Microservice are design to be small, easy to deploy and fast to create without the overhead of setting up. This template is design to solve just that!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published