Skip to content

Unable to create more than 1 sns topic subscription event #1421

@esteban-gs

Description

@esteban-gs
        {
            "function": "main.sns_handler_a",
            "name": "sns_handler_a",
            "event_source": {
                "arn": "arn:aws:sns:us-west-1:123:my-topic",
                "filters": {
                    "foo": [123],
                    "destination": ["trash"]
                },
                "events": [
                    "sns:Publish"
                ]
            }
        },
        {
            "function": "main.sns_handler_b",
            "name": "sns_handler_b",
            "event_source": {
                "arn": "arn:aws:sns:us-west-1:123:my-topic", // same topic
                "filters": { // different filters
                    "foo": [001],
                    "destination": ["not-trash"]
                },
                "events": [
                    "sns:Publish"
                ]
            }
        },

With the SNS events defined above, the zappa update and zappa deploy commands are unable to create 2 subscriptions with different filters to the same sns topic:

INFO:Created sns:Publish event schedule for main.sns_handler_a!
WARNING:sns:Publish event schedule for main.sns_handler_b already exists - Nothing to do here.

Is this behaving as expected? Or am I missing something. Based on how other events declarations behave in Zappa, I would assume that it would create 2 subscriptions to the same topic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions