0
votes

I have an existing AWS Lambda (created via CloudFormation) that I would like to now modify to have a Dead Letter Queue. Essentially this allows me to re-configure my Lambda such that if it fails to process/consume an SQS message during execution, AWS will automagically publish the message to a "Dead Letter Queue" (DLQ) of my choosing.

For the life of me I can't figure out how to add:

"DeadLetterConfig": {
    "TargetArn": "my-queues-ARN" 
}

to my Lambdas CF configuration like it shows in that linked article (above). The closest I was able to do was:

  1. Select Manage this stack link on the Lambdas main page:

enter image description here

  1. This opened up the CF Stack configuration, and if you scroll all the way down to the bottom it allows you to Create a new Change Set:

enter image description here

  1. From inside the Create Change Set screen, you can edit the stack template (inserting the DeadLetterConfig JSON above). However when I try to create the Change Set it complains about the IAM role I'm using:

enter image description here

Any ideas if I'm on the right path here, or where I'm going awry? Thanks in advance!

1
Unrelated to your assume role issue, SQS queues can also have DLQs. If the message that your Lambda is processing came from SQS, then you might want to use an SQS DLQ.jarmod

1 Answers

1
votes

You can do it in the Lambda console itself. Scroll down a little, there's a Debugging and error handling section where you can manually configure it.

enter image description here