Having a bit of a funny using SQS Triggers on Lambda’s.
metrics_batch_write: name: my_lambda ... ... ... reservedConcurrency: 2 events: - sqs: arn: arn:aws:sqs:us-west-2:1111111111:some_queue batchSize: 1
The initial deployment works fine, however succeeding deployments fail, because the event source mapping already exists. I was kind of expecting it to update.
An error occurred: NameOfTheMapping - An event source mapping with SQS arn (" arn:aws:sqs:us-west-2:999999999:some_queue ") and function ("my_lambda") already exists. Please update or delete the existing mapping with UUID XXXXX (Service: AWSLambda; Status Code: 409; Error Code: ResourceConflictException; Request ID: XXXX).
The workaround I’ve been using is going into the console, manually deleting the trigger, and then doing a redeploy. However this is less than ideal for CI/CD
Using Serverless 1.38.0