1 | [![Serverless Application Framework AWS Lambda API Gateway](https://s3.amazonaws.com/assets.github.serverless/readme-serverless-framework.gif)](http://serverless.com)
|
2 |
|
3 | [![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)
|
4 | [![Build Status](https://travis-ci.org/serverless/serverless.svg?branch=master)](https://travis-ci.org/serverless/serverless)
|
5 | [![npm version](https://badge.fury.io/js/serverless.svg)](https://badge.fury.io/js/serverless)
|
6 | [![codecov](https://codecov.io/gh/serverless/serverless/branch/master/graph/badge.svg)](https://codecov.io/gh/serverless/serverless)
|
7 | [![gitter](https://img.shields.io/gitter/room/serverless/serverless.svg)](https://gitter.im/serverless/serverless)
|
8 | [![Known Vulnerabilities](https://snyk.io/test/github/serverless/serverless/badge.svg)](https://snyk.io/test/github/serverless/serverless)
|
9 | [![license](https://img.shields.io/npm/l/serverless.svg)](https://www.npmjs.com/package/serverless)
|
10 |
|
11 | <p align="center">
|
12 | <span>English</span> |
|
13 | <a href="./README_CN.md">简体中文</a>
|
14 | </p>
|
15 |
|
16 | [Website](http://www.serverless.com) • [Docs](https://serverless.com/framework/docs/) • [Newsletter](https://serverless.com/subscribe/) • [Swag](https://teespring.com/stores/serverless) • [Gitter](https://gitter.im/serverless/serverless) • [Forum](http://forum.serverless.com) • [Meetups](https://www.meetup.com/pro/serverless/) • [Twitter](https://twitter.com/goserverless) • [We're Hiring](https://serverless.com/company/jobs/) • [Try Pro](https://dashboard.serverless.com)
|
17 |
|
18 | **The Serverless Framework** – Build applications comprised of microservices that run in response to events, auto-scale for you, and only charge you when they run. This lowers the total cost of maintaining your apps, enabling you to build more logic, faster.
|
19 |
|
20 | The Framework uses new event-driven compute services, like AWS Lambda, Google Cloud Functions, and more. It's a command-line tool, providing scaffolding, workflow automation and best practices for developing and deploying your serverless architecture. It's also completely extensible via plugins.
|
21 |
|
22 | Serverless is an MIT open-source project, actively maintained by a full-time, venture-backed team.
|
23 |
|
24 | <a href="https://www.youtube.com/watch?v=-Nf0ui3qP2E" target="_blank">Watch the video overview here.</a>
|
25 |
|
26 | In 2020, the Serverless Framework began introducing advanced functionality for specific serverless use-cases, known as Serverless Framework Components. Check out the Components featured below, [and more here](https://github.com/serverless-components).
|
27 |
|
28 | | [![serverless framework fullstack application](https://s3.amazonaws.com/assets.github.serverless/components/ad-components-fullstack.png)](https://github.com/serverless-components/fullstack-app) | [![serverless framework express.js](https://s3.amazonaws.com/public.assets.serverless.com/images/ads/ad-components-express.png)](https://github.com/serverless-components/express) | [![serverless framework website](https://s3.amazonaws.com/public.assets.serverless.com/images/ads/ad-components-website.png)](https://github.com/serverless-components/website) | [![serverless framework dynamodb](https://s3.amazonaws.com/public.assets.serverless.com/images/ads/ad-components-dynamodb.png)](https://github.com/serverless-components/aws-dynamodb) |
|
29 | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
30 |
|
31 |
|
32 | ## Contents
|
33 |
|
34 | <img align="right" width="400" src="https://s3-us-west-2.amazonaws.com/assets.site.serverless.com/email/sls-getting-started.gif" />
|
35 |
|
36 | - [Quick Start](#quick-start)
|
37 | - [Examples](https://github.com/serverless/examples)
|
38 | - [Services](#services)
|
39 | - [Features](#features)
|
40 | - [Plugins](https://github.com/serverless/plugins)
|
41 | - [Contributing](#contributing)
|
42 | - [Community](#community)
|
43 | - [Consultants](#consultants)
|
44 | - [Licensing](#licensing)
|
45 | - [Previous Version 0.5.x](#v.5)
|
46 |
|
47 | ## <a name="quick-start"></a>Quick Start
|
48 |
|
49 | [Watch the video guide here](https://serverless.com/framework/) or follow the steps below to create and deploy your first serverless microservice in minutes.
|
50 |
|
51 | 1. **Install via npm:**
|
52 |
|
53 | ```bash
|
54 | npm install -g serverless
|
55 | ```
|
56 |
|
57 | 2. **Set-up your [Provider Credentials](./docs/providers/aws/guide/credentials.md)**. [Watch the video on setting up credentials](https://www.youtube.com/watch?v=HSd9uYj2LJA)
|
58 |
|
59 | 3. **Create a Service:**
|
60 |
|
61 | You can create a new service or [install existing services](#how-to-install-a-service).
|
62 |
|
63 | ```bash
|
64 | # Create a new Serverless Service/Project
|
65 | serverless create --template aws-nodejs --path my-service
|
66 | # Change into the newly created directory
|
67 | cd my-service
|
68 | ```
|
69 |
|
70 | 4. **Deploy a Service:**
|
71 |
|
72 | Use this when you have made changes to your Functions, Events or Resources in `serverless.yml` or you simply want to deploy all changes within your Service at the same time.
|
73 |
|
74 | ```bash
|
75 | serverless deploy -v
|
76 | ```
|
77 |
|
78 | 5. **Deploy the Function:**
|
79 |
|
80 | Use this to quickly upload and overwrite your AWS Lambda code on AWS, allowing you to develop faster.
|
81 |
|
82 | ```bash
|
83 | serverless deploy function -f hello
|
84 | ```
|
85 |
|
86 | 6. **Invoke the Function on AWS:**
|
87 |
|
88 | Invokes an AWS Lambda Function on AWS and returns logs.
|
89 |
|
90 | ```bash
|
91 | serverless invoke -f hello -l
|
92 | ```
|
93 |
|
94 | 7. **Invoke the Function on your machine:**
|
95 |
|
96 | Invokes an AWS Lambda Function on your local machine and returns logs.
|
97 |
|
98 | ```bash
|
99 | serverless invoke local -f hello -l
|
100 | ```
|
101 |
|
102 | 8. **Fetch the Function Logs:**
|
103 |
|
104 | Open up a separate tab in your console and stream all logs for a specific Function using this command.
|
105 |
|
106 | ```bash
|
107 | serverless logs -f hello -t
|
108 | ```
|
109 |
|
110 | 9. **Remove the Service:**
|
111 |
|
112 | Removes all Functions, Events and Resources from your AWS account.
|
113 |
|
114 | ```bash
|
115 | serverless remove
|
116 | ```
|
117 |
|
118 | ### How to Install a Service:
|
119 |
|
120 | This is a convenience method to install a pre-made Serverless Service locally by downloading the Github repo and unzipping it. Services are listed below.
|
121 |
|
122 | ```bash
|
123 | serverless install -u https://github.com/your-url-to-the-serverless-service
|
124 | ```
|
125 |
|
126 | Check out the [Serverless Framework Guide](./docs/providers/aws/guide/README.md) for more information.
|
127 |
|
128 | ## <a name="services"></a>Services (V1.0)
|
129 |
|
130 | The following are services you can instantly install and use by running `serverless install --url <service-github-url>`
|
131 |
|
132 | - [serverless-examples](https://github.com/serverless/examples)
|
133 | - [CRUD](https://github.com/pmuens/serverless-crud) - CRUD service, [Scala Port](https://github.com/jahangirmohammed/serverless-crud-scala)
|
134 | - [CRUD with FaunaDB](https://github.com/faunadb/serverless-crud) - CRUD service using FaunaDB
|
135 | - [CRUD with S3](https://github.com/tscanlin/serverless-s3-crud) - CRUD service using S3
|
136 | - [CRUD with Flask and SQLAlchemy](https://github.com/jetbridge/sls-flask) - Python [CRUD API service](https://blog.jetbridge.com/framework/) with Flask, SQLAlchemy and Swagger
|
137 | - [GraphQL Boilerplate](https://github.com/serverless/serverless-graphql) - GraphQL application Boilerplate service
|
138 | - [Authentication](https://github.com/laardee/serverless-authentication-boilerplate) - Authentication boilerplate service
|
139 | - [Mailer](https://github.com/eahefnawy/serverless-mailer) - Service for sending emails
|
140 | - [Kinesis streams](https://github.com/pmuens/serverless-kinesis-streams) - Service to showcase Kinesis stream support
|
141 | - [DynamoDB streams](https://github.com/pmuens/serverless-dynamodb-streams) - Service to showcase DynamoDB stream support
|
142 | - [Landingpage backend](https://github.com/pmuens/serverless-landingpage-backend) - Landingpage backend service to store E-Mail addresses
|
143 | - [Facebook Messenger Chatbot](https://github.com/pmuens/serverless-facebook-messenger-bot) - Chatbot for the Facebook Messenger platform
|
144 | - [Lambda chaining](https://github.com/pmuens/serverless-lambda-chaining) - Service which chains Lambdas through SNS
|
145 | - [Secured API](https://github.com/pmuens/serverless-secured-api) - Service which exposes an API key accessible API
|
146 | - [Authorizer](https://github.com/eahefnawy/serverless-authorizer) - Service that uses API Gateway custom authorizers
|
147 | - [Thumbnails](https://github.com/eahefnawy/serverless-thumbnails) - Service that takes an image url and returns a 100x100 thumbnail
|
148 | - [Boilerplate](https://github.com/eahefnawy/serverless-boilerplate) - Opinionated boilerplate
|
149 | - [ES6 + Jest](https://github.com/americansystems/serverless-es6-jest) - ES6 + Jest Boilerplate
|
150 | - [PHP](https://github.com/ZeroSharp/serverless-php) - Call a PHP function from your lambda
|
151 | - [Ruby](https://github.com/stewartlord/serverless-ruby) - Call a Ruby function from your lambda
|
152 | - [Slack App](https://github.com/johnagan/serverless-slack-app) - Slack App Boilerplate with OAuth and Bot actions
|
153 | - [Swift](https://github.com/choefele/swift-lambda-app) - Full-featured project template to develop Lambda functions in Swift
|
154 | - [Cloudwatch Alerts on Slack](https://github.com/dav009/serverless-aws-alarms-notifier) - Get AWS Cloudwatch alerts notifications on Slack
|
155 |
|
156 | **Note**: the `serverless install` command will only work on V1.0 or later.
|
157 |
|
158 | ## <a name="features"></a>Features
|
159 |
|
160 | - Supports Node.js, Python, Java, Go, C#, Ruby, Swift, Kotlin, PHP, Scala, & F#
|
161 | - Manages the lifecycle of your serverless architecture (build, deploy, update, delete).
|
162 | - Safely deploy functions, events and their required resources together via provider resource managers (e.g., AWS CloudFormation).
|
163 | - Functions can be grouped ("serverless services") for easy management of code, resources & processes, across large projects & teams.
|
164 | - Minimal configuration and scaffolding.
|
165 | - Built-in support for multiple stages.
|
166 | - Optimized for CI/CD workflows.
|
167 | - Loaded with automation, optimization and best practices.
|
168 | - 100% Extensible: Extend or modify the Framework and its operations via Plugins.
|
169 | - An ecosystem of serverless services and plugins.
|
170 | - A passionate and welcoming community!
|
171 |
|
172 | ## <a name="contributing"></a>Contributing
|
173 |
|
174 | We love our contributors! Please read our [Contributing Document](CONTRIBUTING.md) to learn how you can start working on the Framework yourself.
|
175 |
|
176 | Check out our [help wanted](https://github.com/serverless/serverless/labels/help%20wanted) or [good first issue](https://github.com/serverless/serverless/labels/good%20first%20issue) labels to find issues we want to move forward on with your help.
|
177 |
|
178 | ## <a name="community"></a>Community
|
179 |
|
180 | - [Email Updates](http://eepurl.com/b8dv4P)
|
181 | - [Serverless Forum](http://forum.serverless.com)
|
182 | - [Gitter Chatroom](https://gitter.im/serverless/serverless)
|
183 | - [Serverless Meetups](http://www.meetup.com/serverless/)
|
184 | - [Stackoverflow](http://stackoverflow.com/questions/tagged/serverless-framework)
|
185 | - [Facebook](https://www.facebook.com/serverless)
|
186 | - [Twitter](https://twitter.com/goserverless)
|
187 | - [Contact Us](mailto:hello@serverless.com)
|
188 |
|
189 | ## <a name="consultants"></a>Consultants
|
190 |
|
191 | These consultants use the Serverless Framework and can help you build your serverless projects.
|
192 |
|
193 | - [Andrew Griffiths](https://www.andrewgriffithsonline.com/) - Independent consultant specialising in serverless technology
|
194 | - [Trek10](https://www.trek10.com/)
|
195 | - [Parallax](https://parall.ax/) – they also built the [David Guetta Campaign](https://serverlesscode.com/post/david-guetta-online-recording-with-lambda/)
|
196 | - [Geniusee](https://geniusee.com)
|
197 | - [Nordcloud](https://nordcloud.com) - they created [several plugins](https://github.com/nordcloud?utf8=%E2%9C%93&q=serverless&type=&language=), sponsor [Serverless Days Helsinki](https://helsinki.serverlessdays.io/) and regularly host [Serverless Finland](https://www.meetup.com/Serverless-Finland/) Meetups.
|
198 | - [Carrot Creative](https://carrot.is)
|
199 | - [microapps](http://microapps.com)
|
200 | - [Apiwise](http://www.apiwise.nl)
|
201 | - [Useful IO](http://useful.io) - and [Hail Messaging](http://hail.io)
|
202 | - [WhaleTech](https://whaletech.co/)
|
203 | - [Hop Labs](http://www.hoplabs.com)
|
204 | - [Webscale](https://webscale.fi/briefly-in-english/)
|
205 | - [API talent](http://www.apitalent.co.nz) - who also run [Serverless-Auckland Meetup](http://www.meetup.com/Serverless-Auckland)
|
206 | - [Branded Crate](https://www.brandedcrate.com/)
|
207 | - [cloudonaut](https://cloudonaut.io/serverless-consulting/)
|
208 | - [PromptWorks](https://www.promptworks.com/serverless/)
|
209 | - [Craftship](https://craftship.io)
|
210 | - [EPX Labs](http://www.epxlabs.com/) - runs [Serverless NYC Meetup](https://www.meetup.com/Serverless-NYC/)
|
211 | - [Red Badger](https://red-badger.com)
|
212 | - [Langa](http://langa.io/?utm_source=gh-serverless&utm_medium=github) - They built [Trails.js](http://github.com/trailsjs/trails)
|
213 | - [Emerging Technology Advisors](https://www.emergingtechnologyadvisors.com)
|
214 | - [OneSpeed](https://onespeed.io/)
|
215 | - [Seraro](http://www.seraro.com/) - Who also runs Atlanta Serverless Meetup (https://www.meetup.com/Atlanta-CABI-Camp-Cloud-AI-Blockchain-IOT) and Delhi Serverless Meetup (https://www.meetup.com/Delhi-NCR-Serverless-Architecture-Meetup/)
|
216 | - [superluminar](https://superluminar.io) - runs serverlessdays Hamburg and Serverless Meetup Hamburg
|
217 | - [Onica](https://www.onica.com/aws-cloud-native-developers/) - AWS Premier Consulting Partner for Cloud Native Development and host of [eleven regional Meetup groups](https://www.onica.com/events/).
|
218 | - [null](https://null.tc/) - maintains [Bref](https://bref.sh/) to create serverless PHP applications
|
219 | - [Theodo](https://www.theodo.co.uk) - full stack teams passionate about Serverless that also run the Serverless Transformation Newsletter & Blog.
|
220 | - [JetBridge](https://jetbridge.com) - cloud-native and serverless application development services.
|
221 |
|
222 | ---
|
223 |
|
224 | ## <a name="licensing"></a>Licensing
|
225 |
|
226 | Serverless is licensed under the [MIT License](./LICENSE.txt).
|
227 |
|
228 | All files located in the node_modules and external directories are externally maintained libraries used by this software which have their own licenses; we recommend you read them, as their terms may differ from the terms in the MIT License.
|
229 |
|
230 | # <a name="v.5"></a>Previous Serverless Version 0.5.x
|
231 |
|
232 | You can find projects and plugins relating to version 0.5 [here](./0.5.x-RESOURCES.md). Note that these are not compatible with v1.0 but we are working diligently on updating them. [Guide on building v1.0 plugins](./docs/providers/aws/guide/plugins.md).
|
233 |
|
234 | You can read the v0.5.x documentation at [readme.io](https://serverless.readme.io/v0.5.0/docs).
|