Awesome
Website • Email Updates • Gitter • Forum • Meetups • Twitter • Facebook • Contact 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` -->
Example | Runtime |
---|---|
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 auth0 | nodeJS |
Aws Node Dynamodb Backup <br/> Serverless DynamoDB changes backed up to S3 | nodeJS |
Aws Env Variables Encrypted In A File <br/> Serverless example managing secrets in an encrypted file | nodeJS |
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 Babel | nodeJS |
Aws Github Webhook Listener <br/> Extend your github repositories with this github webhook listener | nodeJS |
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 function | nodeJS |
Aws Node Rekognition Analysis S3 Image <br/> Analyse an Image from an S3 Bucket with Amazon Rekognition | nodeJS |
Aws Node Restapi Mongodb <br/> Serverless REST API with MongoDB using Mongoose and Bluebird | nodeJS |
Aws Rest Api Offline <br/> Serverless REST API with DynamoDB and offline support | nodeJS |
Aws Rest With Dynamodb <br/> Serverless CRUD service exposing a REST HTTP interface | nodeJS |
Aws Scheduled Cron <br/> Example of creating a function that runs as a cron job using the serverless schedule event | nodeJS |
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 request | nodeJS |
Aws Serve Simple Http Endpoint <br/> Example demonstrates how to setup a simple HTTP GET endpoint | nodeJS |
Aws Single Page App Via Cloudfront <br/> Demonstrating how to deploy a Single Page Application with Serverless | nodeJS |
Serverless Single Page App Plugin <br/> A plugin to simplify deploying Single Page Application using S3 and CloudFront | nodeJS |
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 pipeline | nodeJS |
Aws Node Twilio Send Text Message <br/> Send a text message via twilio from aws lambda. See live demo | nodeJS |
Typescript Example | nodeJS |
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 section | python |
Aws Rest With Dynamodb <br/> Serverless CRUD service exposing a REST HTTP interface | python |
Aws Rest With Faunadb <br/> Serverless CRUD service exposing a REST HTTP interface | python |
Aws Rest With Pynamodb <br/> Serverless CRUD service exposing a REST HTTP interface | python |
Aws Scheduled Cron <br/> Example of creating a function that runs as a cron job using the serverless schedule event | python |
Aws Simple Http Endpoint <br/> Example demonstrates how to setup a simple HTTP GET endpoint with python | python |
Azure Node Simple Http Endpoint <br/> An example of making http endpoints with the Azure Functions Serverless Framework plugin | nodeJS |
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 Kubeless | python |
Kubeless Python Simple <br/> This example demonstrates how to setup a simple Python function with Kubeless | python |
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 |
Community Examples
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` -->
Example | Author |
---|---|
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 Pools | bsdkurt |
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 repository | open-bot |
React & Stripe Serverless Ecommerce <br/> Serverless E-Commerce App with AWS Lambda, Stripe and React | patrick-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 Resource | ittus |
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 app | AnomalyInnovations |
Serverless Reactjs Universal Rendering Boilerplate <br/> ReactJS web app Starter kit does universal (isomorphic) rendering with Serverless | TylorShin |
Stack Overflow Monitor <br/> Monitor Stack Overflow questions and post them in a Slack channel | picsoung |
Adoptable Pet Bot <br/> Tweets adoptable pets using Serverless (Node.js) and AWS Lambda | lynnaloo |
Aws Ses Serverless Example <br/> AWS SES example in NodeJS using lambda | lakshmantgld |
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 data | marzeelabs |
Faultline <br/> Error tracking tool on AWS managed services. | faultline |
Giphy Bot <br/> giphy-bot for Facebook chat | tywong |
Grants Api Serverless <br/> ES6 API to consume data from an external API, ingest into Elasticsearch and return a queryable endpoint on top of Elasticsearch | comicrelief |
Honeylambda <br/> a simple, serverless application designed to create and monitor URL {honey}tokens, on top of AWS Lambda and Amazon API Gateway | 0x4D31 |
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 Lambda | mikaelmork |
Jwtauthorizr <br/> Custom JWT Authorizer Lambda function for Amazon API Gateway with Bearer JWT | serverlessbuch |
Keboola Developer Portal <br/> Keboola developer portal built with Serverless | keboola |
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 Presidency | FLGMwt |
Owntracks Serverless <br/> A serverless implementation of the OwnTracks HTTP backend | dschep |
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-site | cplee |
Sc5 Serverless Boilerplate <br/> A boilerplate that contains setup for test-driven development | SC5 |
Serverless + Java Dynamodb Imlementation Example <br/> example for java programmers that want to work with AWS-Lambda and DynamoDB | igorbakman |
Serverless + Lambda Protobuf Responses <br/> Demo using API Gateway and Lambda with Protocol Buffer | theburningmonk |
Serverless + Medium Text To Speech <br/> Serverless-based, text-to-speech service for Medium articles | RafalWilinski |
Serverless Aws Rekognition Finpics <br/> Use AWS Rekognition to provide a faces search of finpics.com | rgfindl |
Serverless Blog To Podcast <br/> Service that reads RSS feed and converts the entries to a podcast feed and audio files using Amazon Polly | SC5 |
Serverless Cloudwatch Rds Custom Metrics <br/> A NodeJS-based MySQL RDS Data Collection script to push Custom Metrics to Cloudwatch with Serverless | AndrewFarley |
Serverless Delivery Framework <br/> This is a boilerplate for version release pipeline with serverless framework | 99xt |
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 quotes | pmuens |
Serverless Garden Aid <br/> IoT Garden Aid Backend | garden-aid |
Serverless Graphql Api <br/> Serverless GraphQL API using Lambda and DynamoDB | boazdejong |
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 & serverless | TylorShin |
Serverless Mailgun Slack <br/> A Serverless function for posting to a Slack Webhook in response to a Mailgun route | Marcus-L |
Serverless Messenger Boilerplate <br/> Serverless messenger bot boilerplate | SC5 |
Serverless Modern Koa <br/> Serverless modern koa starter kit | barczaG |
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 data | jch254 |
Serverless Postgraphql <br/> GraphQL endpoint for PostgreSQL using postgraphql | rentrop |
Serverless Python Sample <br/> A simple serverless python sample with REST API endpoints and dependencies | bennybauer |
Serverless React Boilerplate <br/> A serverless react boilerplate for offline development | 99xt |
Serverless Screenshot <br/> Serverless Screenshot Service using PhantomJS | svdgraaf |
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 emoji | markhobson |
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 framework | aletheia |
Serverless Weekly2pocket App <br/> Serverless-powered API for sending posts to pocket app | s0enke |
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 counter | takahashim |
Sls Form Mail <br/> Send SNS email from form data | takahashim |
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 |
Contributing
We are happy to accept more examples from the community. 🎉
Adding example code
- Make sure your contribution matches the linting setup for this repo:
Run the linting via
npm run lint
-
Add a
package.json
file in your example with the name of the example and adescription
and anydependencies
used. -
Regenerate the README.md with the following command
npm run docs
- 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.
-
Add
link
,title
, anddescription
to the community-examples.json file. -
Open a new pull request with your example. ⚡️