Skip to content

SQS Event Source fails on redeployment #2146

Description

@paranoidroro

Pretty much what it says on the title

I am using the SQS event source decorator, @app.on_sqs_message(queue='my-queue', batch_size=1) to trigger a Lambda when there are messages in my queue.

The first deployment is always fine but I get the following error on redeployment:

An error occurred (ResourceConflictException) when calling the
CreateEventSourceMapping operation: An event source mapping with SQS arn ("
arn:aws:sqs:XX-XXXX-X:XXXXXXXXXX:XXXXXX-XXXXXXXX ") and
function (" lambda-XXXXX-XXXXXX ") already exists. Please
update or delete the existing mapping with UUID
XXXXXXX-XXXXX-XXXX-XXXXXX

I am having to delete all the event source mappings on redeploy currently which isn't great. Chalice should check if the event source mapping exists before trying to create one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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