serverless-plugin-lambda-warmup

1.0.1 • Public • Published

serverless-plugin-lambda-warmup

Build Status Coverage Status NPM version Dependencies Status DevDependencies Status

A Serverless plugin that creates CloudWatch rule to keep your AWS Lambda functions warm.

Usage

service: my-service
 
plugins:
  - serverless-plugin-lambda-warmup
 
custom:
  warmup:
    schedule: 'rate(10 minutes)' # [Optional] Schedule expression for the rule (defaults to "rate(5 minutes)") 
    stages: # [Optional] Stages to keep lambdas warm (all stages by default) 
      - prod
    payload: # [Optional] Event payload (defaults to "{ source: 'serverless-plugin-lambda-warmup' }") 
      type: 'warmup'
 
functions:
  function1:
    handler: 'src/function1.js'
 
  function2:
    handler: 'src/function2.js'
    warmup: false # [Optional] Allows to exclude functions from the warmup rule 

License

The MIT License (MIT)

Copyright (c) 2017 Anton Bazhal

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Package Sidebar

Install

npm i serverless-plugin-lambda-warmup

Weekly Downloads

98

Version

1.0.1

License

MIT

Unpacked Size

9.03 kB

Total Files

5

Last publish

Collaborators

  • antonbazhal