1.1.1 • Published 3 years ago

@lytesoft/serverless-cwe-sns-lambda v1.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

Serverless Cwe Sns Sqs Lambda

serverless MIT License

This plugin allows to define a cloudwatch event rule as the trigger for a lambda. To handle errors and retries, this event will go through SNS (connected to a DLQ to avoid delivery problems) and call a lambda which should have the onError param with another DLQ defined (outside the scope of this plugin)

Install

Run npm install in your Serverless project.

$ npm install --save-dev https://github.com/tcastelli/serverless-cwe-sns-lambda/master/tarball

Add the plugin to your serverless.yml file

plugins:
  - "serverless-cwe-sns-lambda"

Setup

functions:
  processEvent:
    handler: handler.handler
    events:
      - cweSns:
          ruleResourceName: XXXXEvent                           #required
          topicResourceName: XXXXTopic                          #optional
          dlqResourceName:  string                              #optional
          dlqPolicyResourceName : string                        #optional
          ruleMessage: Input || InputPath || InputTransformer   #optional                         
          filterPolicy: Object                                  #optional
          prefix: string                                        #optional

resources:
  Resources:
    XXXXEvent:
      Type: AWS::Events::Rule
      Properties:
        ScheduleExpression: cron(0/3 * * * ? *)
        State: ENABLED
        Targets: []

plugins:
  - serverless-cwe-sns-lambda
1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

4 years ago