/serverless-plugin-lambda-config

Serverless plugin that allows you to attach DLQs and configure invoke config on your AWS Lambda functions

Primary LanguageJavaScriptMIT LicenseMIT

Welcome to serverless-plugin-lambda-config 👋

Version License: MIT Twitter: maciej

Serverless plugin that allows you to attach DLQs and configure invoke config on your AWS Lambda functions

Prerequisites

  • node >=14

Install

yarn install

Usage

Install using:

serverless plugin install --name serverless-plugin-lambda-config

Then configure in your serverless.yml. You can do it both globally:

...
custom:
  lambdaConfig:
    # DLQ config for all lambda functions
    dlqArn: arn:aws:sqs:eu-west-1:000000000000:some-sqs-queue # you can use an SQS queue or an SNS topic arn
    # EventInvokeConfig config for all lambda functions
    invokeConfig:
      retryAttempts: 9
      maxEventAge: 999

or at a function level:

...
functions:
  some_function:
      handler: src.handler.handle_function
      lambdaConfig:
        dlqArn: arn:aws:sqs:eu-west-1:000000000000:some-sqs-queue
        invokeConfig:
            retryAttempts: 9
            maxEventAge: 999
      events:
          - schedule: rate(2 minutes)

Specifying any of the top-level config parameters (dlqArn or invokeConfig) on a function overrides their global values.

Author

👤 Maciej Wilczyński

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2021 Maciej Wilczyński (maciej@lupine.software).
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator