Home

Awesome

WebsiteEmail UpdatesGitterForumMeetupsTwitterFacebookContact Us

Serverless Examples

<img align="right" width="300" src="https://s3-us-west-2.amazonaws.com/assets.site.serverless.com/email/sls-getting-started.gif" />

A collection of ready-to-deploy Serverless Framework services.

Table of Contents

<!-- ⛔️ AUTO-GENERATED-CONTENT:START (TOC:collapse=true&collapseText=Click to expand) generated w/ `npm run docs` --> <details> <summary>Click to expand</summary> </details> <!-- AUTO-GENERATED-CONTENT:END -->

Getting Started

If you are new to serverless, we recommend getting started with by creating an HTTP API Endpoint in NodeJS, Python, or Java

Examples

Each example contains a README.md with an explanation about the service and it's use cases.

Have an example? Submit a PR or open an issue. ⚡️

To install any of these you can run:

serverless install -u https://github.com/serverless/examples/tree/master/folder-name -n my-project
<!-- AUTO-GENERATED-CONTENT:START (SERVERLESS_EXAMPLE_TABLE) t generated w/ `npm run docs` -->
ExampleRuntime
Aws Alexa Skill <br/> This example demonstrates how to use an AWS Lambdas for your custom Alexa skill.nodeJS
Aws Node Auth0 Cognito Custom Authorizers Api <br/> Authorize your API Gateway with either Auth0 or Cognito RS256 tokens.nodeJS
Aws Auth0 Api Gateway <br/> Demonstration of protecting API gateway endpoints with auth0nodeJS
Aws Node Dynamodb Backup <br/> Serverless DynamoDB changes backed up to S3nodeJS
Aws Env Variables Encrypted In A File <br/> Serverless example managing secrets in an encrypted filenodeJS
Aws Env Variables <br/> This example demonstrates how to use environment variables for AWS Lambdas.nodeJS
Aws Fetch File And Store In S3 <br/> Fetch an image from remote source (URL) and then upload the image to a S3 bucket.nodeJS
Aws Function Compiled With Babel <br/> Demonstrating how to compile all your code with BabelnodeJS
Aws Github Webhook Listener <br/> Extend your github repositories with this github webhook listenernodeJS
Aws Node Graphql Api With Dynamodb <br/> A single-module GraphQL endpoint with query and mutation functionality.nodeJS
Aws Iot Event <br/> Example on how to setup a AWS IoT Rule to send events to a Lambda functionnodeJS
Aws Node Rekognition Analysis S3 Image <br/> Analyse an Image from an S3 Bucket with Amazon RekognitionnodeJS
Aws Node Restapi Mongodb <br/> Serverless REST API with MongoDB using Mongoose and BluebirdnodeJS
Aws Rest Api Offline <br/> Serverless REST API with DynamoDB and offline supportnodeJS
Aws Rest With Dynamodb <br/> Serverless CRUD service exposing a REST HTTP interfacenodeJS
Aws Scheduled Cron <br/> Example of creating a function that runs as a cron job using the serverless schedule eventnodeJS
Aws Scheduled Weather <br/> Example of creating a function that runs as a cron job using the serverless schedule event through pulling weather and sending an email daily.nodeJS
Aws Serve Dynamic Html Via Http Endpoint <br/> Hookup an AWS API Gateway endpoint to a Lambda function to render HTML on a GET requestnodeJS
Aws Serve Simple Http Endpoint <br/> Example demonstrates how to setup a simple HTTP GET endpointnodeJS
Aws Single Page App Via Cloudfront <br/> Demonstrating how to deploy a Single Page Application with ServerlessnodeJS
Serverless Single Page App Plugin <br/> A plugin to simplify deploying Single Page Application using S3 and CloudFrontnodeJS
Aws Node Stripe Integration <br/> This example for Stripe integration using AWS Lambda and API Gateway.nodeJS
Aws Text Analysis Via Sns Post Processing <br/> Example demonstrates how to setup a simple data processing pipelinenodeJS
Aws Node Twilio Send Text Message <br/> Send a text message via twilio from aws lambda. See live demonodeJS
Typescript ExamplenodeJS
Upload To S3 And Postprocess <br/> Upload a files to S3 to trigger a lambda function.nodeJS
Aws Alexa Skill <br/> This example demonstrates how to use an AWS Lambdas for your custom Alexa skill.python
Aws Python Pynamodb S3 Sigurl <br/> Serverless signed uploader REST API using pynamodb, s3 generated events, custom log format, and DRY serverless.yml with custom sectionpython
Aws Rest With Dynamodb <br/> Serverless CRUD service exposing a REST HTTP interfacepython
Aws Rest With Faunadb <br/> Serverless CRUD service exposing a REST HTTP interfacepython
Aws Rest With Pynamodb <br/> Serverless CRUD service exposing a REST HTTP interfacepython
Aws Scheduled Cron <br/> Example of creating a function that runs as a cron job using the serverless schedule eventpython
Aws Simple Http Endpoint <br/> Example demonstrates how to setup a simple HTTP GET endpoint with pythonpython
Azure Node Simple Http Endpoint <br/> An example of making http endpoints with the Azure Functions Serverless Framework pluginnodeJS
Google Node Simple Http Endpoint <br/> An example of making http endpoints with the Google Cloud Functions Serverless Framework plugin.nodeJS
Kubeless Python Simple <br/> This example demonstrates how to setup a simple Python function with Kubelesspython
Kubeless Python Simple <br/> This example demonstrates how to setup a simple Python function with Kubelesspython
Openwhisk Go Simple <br/> Example demonstrates how to setup a simple Go function with OpenWhisk.nodeJS
Openwhisk Node And Docker Chaining Functions <br/> Example of chaining function calls using sequences and docker images.nodeJS
Openwhisk Node Chaining Functions <br/> Example of chaining function calls using sequences and the sdk.nodeJS
Openwhisk Node Scheduled Cron <br/> Example of creating a function that runs as a cron job using the serverless schedule event.nodeJS
Openwhisk Node Simple Http <br/> Example demonstrates how to setup a simple HTTP GET endpoint with OpenWhisk.nodeJS
Openwhisk Node Simple <br/> Simple example demonstrating OpenWhisk provider support.nodeJS
Openwhisk Php Simple <br/> Example demonstrates how to setup a simple PHP function with OpenWhisk.php
Openwhisk Python Scheduled Cron <br/> Example of creating a Python function that runs as a cron job using the serverless schedule event.python
Openwhisk Python Simple Http Endpoint <br/> Example demonstrates how to setup a simple HTTP GET endpoint with OpenWhisk.python
Openwhisk Python Simple <br/> Example demonstrates how to setup a simple Python function with OpenWhisk.python
Openwhisk Swift Package With Precompiled Binaries <br/> Swift packages and pre-compiled binaries on OpenWhisk.swift
Openwhisk Swift Scheduled Cron <br/> Example of creating a Swift function that runs as a cron job using the serverless schedule event.swift
Openwhisk Swift Simple Http Endpoint <br/> Example demonstrates how to setup a simple HTTP endpoint using Swift function with OpenWhisk.swift
Openwhisk Swift Simple <br/> Example demonstrates how to setup a simple Swift function with OpenWhisk.swift
<!-- AUTO-GENERATED-CONTENT:END -->

Community Examples

Add an example

To install any of these you can run:

serverless install -u https://github.com/author/project -n my-project
<!-- AUTO-GENERATED-CONTENT:START (COMMUNITY_EXAMPLES_TABLE) generated w/ `npm run docs` -->
ExampleAuthor
Aws Api Gateway Serverless Project Written In Go <br/> A serverless project that contains an API Gateway endpoint powered by a Lambda function written in golang and built using eawsy/aws-lambda-go-shim.yunspace
Aws Cognito Custom User Pool Example <br/> Example CloudFormation custom resource backed by a lambda using Cognito User Poolsbsdkurt
Aws Lambda Power Tuning (Powered By Step Functions) <br/> Build a Step Functions state machine to optimize your AWS Lambda Function memory/power configuration.alexcasalboni
Amazon Kinesis Streams Fan Out Via Kinesis Analytics <br/> Use Amazon Kinesis Analytics to fan-out your Kinesis Streams and avoid read throttling.alexcasalboni
Open Bot <br/> An unoptionated Github bot driven by a configuration file in the repositoryopen-bot
React & Stripe Serverless Ecommerce <br/> Serverless E-Commerce App with AWS Lambda, Stripe and Reactpatrick-michelberger
Sqs Worker With Aws Lambda And Cloudwatch Alarms <br/> Process messages stored in SQS with an auto-scaled AWS Lambda worker function.sbstjn
Serverless + Lambda + Vpc + Nat + Redis <br/> Demo using API Gateway and Lambda with VPC and NAT to access Internet and AWS Resourceittus
Serverless Analytics <br/> Write your own Google Analytics clone and track website visitors serverless with API Gateway, Kinesis, Lambda, and DynamoDB.sbstjn
Serverless Es6/7 Crud Api <br/> Serverless Stack examples of backend CRUD APIs (DynamoDB + Lambda + API Gateway + Cognito User Pool authorizer) for React.js single-page appAnomalyInnovations
Serverless Reactjs Universal Rendering Boilerplate <br/> ReactJS web app Starter kit does universal (isomorphic) rendering with ServerlessTylorShin
Stack Overflow Monitor <br/> Monitor Stack Overflow questions and post them in a Slack channelpicsoung
Adoptable Pet Bot <br/> Tweets adoptable pets using Serverless (Node.js) and AWS Lambdalynnaloo
Aws Ses Serverless Example <br/> AWS SES example in NodeJS using lambdalakshmantgld
Bittman <br/> A serverless project that follows a stock trading algorithm and uses scheduled functions to save data to DynamoDB and send emails through Mailgun.rhlsthrm
Cordis Serverless <br/> A serverless API for EU Cordis datamarzeelabs
Faultline <br/> Error tracking tool on AWS managed services.faultline
Giphy Bot <br/> giphy-bot for Facebook chattywong
Grants Api Serverless <br/> ES6 API to consume data from an external API, ingest into Elasticsearch and return a queryable endpoint on top of Elasticsearchcomicrelief
Honeylambda <br/> a simple, serverless application designed to create and monitor URL {honey}tokens, on top of AWS Lambda and Amazon API Gateway0x4D31
Jrestless Examples <br/> JRestless (Java / JAX-RS) examples for API Gateway Functions (plain JAX-RS, Spring, binary data requests/responses, custom authorizers and Cognito User Pool authorizers), SNS Functions (asynchronous communication between functions) and Service Functions (synchronous HTTP-like communication between functions - transparent through Feign)bbilger
Jwt Lambda Python <br/> Minimal proof-of-concept implementation of JWT with Serverless / AWS Lambdamikaelmork
Jwtauthorizr <br/> Custom JWT Authorizer Lambda function for Amazon API Gateway with Bearer JWTserverlessbuch
Keboola Developer Portal <br/> Keboola developer portal built with Serverlesskeboola
Offset Trump <br/> Single page app using Serverless (C# runtime) and S3 site hosting. Pledge to do a good thing for the next four years to offset the potential negative effects of the US PresidencyFLGMwt
Owntracks Serverless <br/> A serverless implementation of the OwnTracks HTTP backenddschep
Pfs Email Serverless <br/> This is a lambda function created by the serverless framework. It searches through members in our mongodb who have not been sent emails and sends them an email with their custom token to unlock the pledge free stream. It then marks those members off as already receiving the email.SCPR
Plaid Cashburndown Service <br/> Service for calculating cash burndown with plaid. Frontend code can be found here: https://github.com/cplee/cashburndown-sitecplee
Sc5 Serverless Boilerplate <br/> A boilerplate that contains setup for test-driven developmentSC5
Serverless + Java Dynamodb Imlementation Example <br/> example for java programmers that want to work with AWS-Lambda and DynamoDBigorbakman
Serverless + Lambda Protobuf Responses <br/> Demo using API Gateway and Lambda with Protocol Buffertheburningmonk
Serverless + Medium Text To Speech <br/> Serverless-based, text-to-speech service for Medium articlesRafalWilinski
Serverless Aws Rekognition Finpics <br/> Use AWS Rekognition to provide a faces search of finpics.comrgfindl
Serverless Blog To Podcast <br/> Service that reads RSS feed and converts the entries to a podcast feed and audio files using Amazon PollySC5
Serverless Cloudwatch Rds Custom Metrics <br/> A NodeJS-based MySQL RDS Data Collection script to push Custom Metrics to Cloudwatch with ServerlessAndrewFarley
Serverless Delivery Framework <br/> This is a boilerplate for version release pipeline with serverless framework99xt
Serverless Examples Cached Rds Ws <br/> A serverless framework example project that uses API Gateway, ElastiCache, and RDS PostgreSQL.mugglmenzel
Serverless Facebook Quotebot <br/> 100% Serverless Facebook messenger chatbot which will respond with inspiring quotespmuens
Serverless Garden Aid <br/> IoT Garden Aid Backendgarden-aid
Serverless Graphql Api <br/> Serverless GraphQL API using Lambda and DynamoDBboazdejong
Serverless Html Pdf <br/> Service that convert HTML to PDF using PhantomJS's rasterize example.calvintychan
Serverless Image Manager <br/> image upload / download with resizing. Used API gateway's binary support & serverlessTylorShin
Serverless Mailgun Slack <br/> A Serverless function for posting to a Slack Webhook in response to a Mailgun routeMarcus-L
Serverless Messenger Boilerplate <br/> Serverless messenger bot boilerplateSC5
Serverless Modern Koa <br/> Serverless modern koa starter kitbarczaG
Serverless Msg Gateway <br/> A messaging aggregator for kik, skype, twilio, telegram, & messenger. Send and receive messages in a standard format.yonahforst
Serverless Newsletter Signup <br/> Saves user details into DynamoDB table. Required values are email, first_name and last_name.ivanderbu2
Serverless Npm Registry <br/> Serverless private npm registry, proxy and cache.craftship
Serverless Pokego <br/> Serverless-powered API to fetch nearby Pokemon Go datajch254
Serverless Postgraphql <br/> GraphQL endpoint for PostgreSQL using postgraphqlrentrop
Serverless Python Sample <br/> A simple serverless python sample with REST API endpoints and dependenciesbennybauer
Serverless React Boilerplate <br/> A serverless react boilerplate for offline development99xt
Serverless Screenshot <br/> Serverless Screenshot Service using PhantomJSsvdgraaf
Serverless Slack Cron <br/> Lambda function which sends messages to Slack channel in regular intervals via cron trigger.ivanderbu2
Serverless Slack Emojibot <br/> Serverless slack bot for emojimarkhobson
Serverless Slack Trevorbot <br/> Slack bot for info on where in the world is Trevor Gerhardt?conveyal
Serverless Url Shortener <br/> A simple url-shortener, using Serverless frameworkaletheia
Serverless Weekly2pocket App <br/> Serverless-powered API for sending posts to pocket apps0enke
Slack Signup Serverless <br/> Serverless signup to Slack and more. Lambda with Python, StepFunctions, and Web front end. Python boilerplate included.dzimine
Sls Access Counter <br/> Site visitor countertakahashim
Sls Form Mail <br/> Send SNS email from form datatakahashim
Video Preview And Analysis Service <br/> An event-driven service that generates labels using Amazon Rekognition and creates preview GIF animation from a video file.laardee
<!-- AUTO-GENERATED-CONTENT:END -->

Contributing

We are happy to accept more examples from the community. 🎉

Adding example code

  1. Make sure your contribution matches the linting setup for this repo:

Run the linting via

npm run lint
  1. Add a package.json file in your example with the name of the example and a description and any dependencies used.

  2. Regenerate the README.md with the following command

npm run docs
  1. Open a new pull request with your example. ⚡️

Adding a community example

We love hearing about projects happening in the community. Feel free to add your serverless project to our growing list.

  1. Add link, title, and description to the community-examples.json file.

  2. Open a new pull request with your example. ⚡️