Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "RedrivePolicy" setting the "SqsSubscription" property of an "SNS" event source mapping for an "AWS::Serverless::Function" resource #1933

Open
piersf opened this issue Feb 14, 2021 · 0 comments

Comments

@piersf
Copy link

piersf commented Feb 14, 2021

Describe your idea/feature/enhancement

When using an SNS type of event source mapping for an AWS::Serverless::Function resource, one is able to specify an object to the SqsSubscription property. This enables batching SNS topic notifications in an SQS queue. Essentially this creates an SNS Subscription with the queue being the subscriber.

However, the SqsSubscription property object does not have a property to set a DLQ for this SNS subscription, like you can set in an AWS::SNS::Subscription resource by using the RedrivePolicy property.

Proposal

I propose that a RedrivePolicy property is added to the SNS event source mapping type of an AWS::Serverless::Function resource. A possible example can be seen below:

MyFunction:
    Type: "AWS::Serverless::Function"
    Properties:
    ..........
    ..........
    ..........
    Events:
        FanoutSnsTopic:
          Type: SNS
          Properties:
            Topic: MyTopic
            SqsSubscription:
              QueuePolicyLogicalId: "PolicyId"
              Enabled: true
              QueueArn: MyQueueArn
              QueueUrl: MyQueueUrl
              RedrivePolicy: MyDLQArn     # <------------------
              BatchSize: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants