Send error event of an Lambda function to SNS Topic
The article discusses how to send error events from an AWS Lambda function to an SNS topic. It outlines the process of setting up an SNS input topic and an error topic, along with a Lambda function that simulates message processing failures. The article provides step-by-step instructions for configuring the necessary components in the AWS Console.
- ▪The Lambda function named ProcessMessages is invoked asynchronously when a message is published to the SNS input topic.
- ▪If the Lambda function fails to process a message after retries, it sends a failure record to the SNS error topic.
- ▪The article includes detailed steps for creating SNS topics, subscribing to notifications, and configuring the Lambda function to handle errors.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 2291246) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Danh Hoang Hieu Nghi Posted on May 19 Send error event of an Lambda function to SNS Topic #sns #aws 1. Bài toán Giả sử chúng ta có một Lambda function tên là ProcessMessages. SNS InputTopic -> Lambda ProcessMessages Lambda được invoke async khi có messege publish vào trong SNS topic InputTopic.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).