How to set DeadLetterQueue (DLQ) on AWS Lambda functions using the AWS CLI

UPDATE: It's important to note that as of now, DLQ's are ONLY supported in the us-east-2 (Ohio) region. While this command doesn't return any errors in other regions, it also doesn't make any changes.

One of the cooler announcements from re:Invent that you can start using right now is Dead Letter Queues (DLQ) for AWS Lambda functions. This has the advantage of allowing you to re-try, and alert, on events that fail even after being re-tried by AWS Lambda automatically.

You can find out more information on DLQ for Lambda by reading the official documentation, however in order to get quickly started with it, you should create a new SQS queue and configure a lambda function to send to it. This should be able to be done through the AWS Console, but it doesn't appear to be there yet, so here's how to get started with the CLI.

First, upgrade to the latest version:

sudo pip install -U awscli

Then, update your function:


aws lambda update-function-configuration --function-name LambdaFunctionName --dead-letter-config TargetArn=sqs or sns arn

That's it, you should start seeing DLQ events coming in on the SQS queue you configured anytime there is a complete failure, after Lambda's re-tries have all failed.

From here, you can set up alerts using SES, you could set this up to notify you via SNS, or have another Lambda function read the queue every few minutes to pick up and try re-processing the events at a later date.

Comments

sellakumar said…
I am really impressed with the way of writing of this blog. The author has shared the info in a crisp and short way.


Cloud Migration services

Aws Cloud Migration services

Azure Cloud Migration services
sellakumar said…
We are a part of the success story for many of our customer's successful cloud Migrations.
Vmware Cloud Migration services

Database Migration services
sellakumar said…
Thank you for the informative post about Security challenges in AWS , Found it useful . cloud migration services have now become secured and with no-risk

Lia Infraservices
sellakumar said…
Thank you for the informative post about Security challenges in AWS , Found it useful . cloud migration services have now become secured and with no-risk

Cloud Migration services


Best Cloud Migration Tool
Clothing women said…
Instyle jackets is one of the best website for leather jacket products. Buy now to get the best services.

Unknown said…
Especially if you’re unfamiliar with the different types jackets and coats than we are here only to provide you ourb3 bomber sheepskin shearling leather jacket at your doorstep worldwide.

Gorish dua said…
Thanks for sharing.
We at Antino Labs believe in redefining and refining our model to suit the industry's requirements. Antino Labs' several years of experience in the market has let us register our global presence. Antino Labs' has the vision to become the world's most trusted partner for digital transformation and we aim to become a brand that defines innovation and the latest technology. We offer clients a one-stop solution for all their interests. Click the below links if you're looking for Web Development Company in Gurgaon, Website Designing Company in Gurgaon, Technology Consultant Services, Ecommerce Account Management Services, Mobile App Development Company in Gurgaon and UI UX Design Services.
Unknown said…
The Made in India, Debate and Discussion App which is the next revolution in social networking, Opinito networks you with other users who share your likes and dislikes – automatically!

Opinito provides you a platform where trending news and ideas are arranged in topics by community itself and it let you discuss and debate as per your opinions. There are 10K active users and more coming daily and posting regularly.

At Opinito You can choose from myriads of topics listed like Trending Political News, Sports News, Tech News and so on. All you have got to do is to Join your favorite topic by just hitting a like and let opinito create a personalized feed for you and there you go. Now, you can debate and discuss on any of the topic.

Download Now - Debate and Discussion App
alsamotive said…
One of the most important maintenance services for your car, truck or SUV is none other than the oil and filter change. Scheduled maintenance will keep your car running smoothly for years, and it can even help increaseCar ac repair near me Abu Dhabi the value if you ever decide to sell your car. ALSA Automotive Repair is pleased to assist you with a complete oil change, lube and filter service.
Together with our comprehensive knowledge of materials and safety protocols that follow strict regulations, we offer a wide range of bulkdry bulk trucking transportation trucks to ensure that each load is hauled and transported safely and efficiently.
wewriteessay said…
We treat our clients like family so we ensure when you rely on us, like family, we will not let you down! We will help you at buy cheap assignmentWe are pleased to state that till date there is not a single customer who was left disappointed with our service.
Unknown said…
Thank you for the informative post about Security challenges in AWS , Found it useful . cloud migration services have now become secured and with no-risk..
buy bulk instagram accounts
sex honey uae said…
A natural aphrodisiac royal epimedium sex honey that gives you energy and relief from erectile dysfunction and enhances both female arousal and male performance
richamalhotra said…
Great post! Thanks for sharing this useful information keep update more about this

Visit: https://www.sevenmentor.com/amazon-web-services-training-institute-in-pune.php
Gorish dua said…
Check out these clutch reviews. clutch reviews.
richamalhotra said…
This comment has been removed by the author.
richamalhotra said…
Great post! Thanks for sharing this useful information keep update more about this.
Visit: AWS Classes in Pune
richamalhotra said…
AWS skills are at the top list of the most demanding skills for employers nowadays. AWS has excellent career opportunities with around 25,361 jobs openings and around 60% of cloud computing jobs needed AWS skills.
Visit: AWS Courses in Pune
AWS Training in Pune
Unknown said…
I feel completely that love and read more on this topic. I am very glad to read this info. It helps me very much to solve some problems. Buy Google Voice Numbers I really like and recognize your website post. Thanks for this post. Google Voice numbers for sale
Rubina Sudais said…
Hasten is uniquely positioned to maximize the success of its customers by utilizing its vast network of relationships along withFly Ash Texas its unwavering focus on its core principles of honesty, reliability, quality, credibility, and trust. With the goal of providing quality products, safely, and on a timely basis, Hasten will ensure you are satisfied with the end result.
Techwriter said…
I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end.
AWS Training In Pune

jeeniehogwartz said…
We are The Truffleers and we have a passion for delicious, chocolate truffles! Our exquisite truffles have been lovingly made in FranceBuy chocolate truffles Riyadh since the early 1930’s using only the finest, most exquisite ingredients. Magnifique!
rsagar said…
This is a very nice one and gives in-depth information. I am really happy with the quality and presentation of the article. I’d really like to appreciate the efforts you get with writing this post. Thanks for sharing.
SAP MDG Classes in Pune
SAP ABAP Classes in Pune
HIGS said…

HIGS offers complete research assistance for our clients across the globe. We provide end-to-end PhD research assistance for our clients across all domains with the help of top-notch research experts.
http://higssoftware.com/
bomber style said…
boneshia.com is one of the best leading leather jacket website of 2022 which provide best leather jackets. we make latest leather jacket designyellowstone tv series official merchandise plus we make custom leather jacket designs as well to make them for you. buy from here to get the best quality leather jackets.
Carol Roberts said…
We specialise in providing ecommerce website design, Magento development, digital marketing agency houston and Local SEO services in Houston.
The diploma in software testing (DST) offered by SevenMentor Institute targets this need by training students through a structured program for having the right balance of theory and practical sessions. During the program the students get to know the ins and outs of practical techniques of testing as are expected by the industry. DST ensures an exhaustive coverage of the entire spectrum of Software testing Classes in Pune .
Looking for a quality plastering contractor in Edmonton? Look no further than brandtplastering. We are a trusted contractor that has years of experience in the plastering industry, and we are committed to providing qualitycladding repairs edmonton workmanship and customer service. We offer a wide range of services, including residential and commercial plastering, restoration work, and more. Contact us today to learn more about our services and how we can help you achieve the results you need.