HANDLING AWS BOUNCE NOTIFICATIONS FROM SIMPLE EMAIL SERVICE – SES
I followed the following steps to handling the bounces and complaints
i) Created topic on Amazon SNS named bounces and complaints
ii) Created subscription on the created topic, chose email as format i wanted to get responses and specified email
After confirmation of email of subscription from the email, I went back to my SES account
iii) Selected the verified email and expanded the notifications dropdown.
iv) Edited configurations of that email and assigned bounces and complaints respective to the SNS topics I created….
tested
Amazon SES with handling Bounces and Complaints
===============================================
– Monitor your bounces and complaints and remove any bounced or complained recipient addresses from your mailing list.
– Dashboard to see the status email delivery
– Dashboard to control and managing the blacklist
The flow of Bounce and Complaint handling in AWS using SNS
-First, we need to create an SNS Topic. An SNS Topic is a communication channel to send messages and subscribe to notifications. It provides an access point for publishers and subscribers to communicate with each other. The following code snippet will create an SNS Topic called ‘bounce-complaint-topic’.
-After creating the topic we’ll now create a subscription request at Amazon SQS queue that can receive notification messages from Amazon SNS. Once you subscribe an endpoint to a topic and the subscription is confirmed, the endpoint will receive all messages published to that topic.
-After confirming the subscription we’ll now set the notifications types that will be published to the specified Amazon SNS topic,
https://corgibytes.com/blog/2017/01/31/aws-ses-sns/
Domain Setup in AWS SES
As soon as a new domain is added for verification DKIM record sets, TXT records, and MX(for receive) records are displayed, which must be added to the domain’s DNS settings.
-TXT record is used to verify domain ownership and ensure email security.
-MX record specifies the mail server responsible for accepting email messages on behalf of a domain name.
-DKIM records are an email authentication method designed to detect forged sender addresses in email, a technique often used in phishing and email spam.
Every email that you sent has the possibility of bounce or complaint. SES can send you detailed notifications about your bounces, complaints, and deliveries. You can configure this under the notifications tab.
SES + Lambda
Get SES bounce, complaint, delivery details using Lambda, SNS
AWS: Get SES bounce, complaint, delivery details using Lambda, SNS and DynamoDB or AWS Glue
LOGGING AND MONITORING AWS SES EMAIL DELIVERY METRICS – Article
https://www.plum.io/tech-blog/logging-and-monitoring-aws-ses-email-delivery-metrics
Amazon SES with handling Bounces and Complaints – Blocked List Handling SQS+SES+Lambda
https://github.com/andanhm/amazon_ses/blob/master/README.md
Blocked List Handling SES+Lambda – aws-ses-lambda
https://github.com/dwyl/aws-ses-lambda/blob/master/lib/send.js
SQS + Lambda
Message Queueing in Node.js with AWS SQS – Using Consumer Package to send mail
https://stackabuse.com/message-queueing-in-node-js-with-aws-sqs/
SQS send, receive and delete messages with NodeJS
https://www.linkedin.com/pulse/sqs-send-receive-delete-messages-nodejs-karandeep-singh-
SNS + Lamda
Publishing and Subscribing to AWS SNS Messages with Node.js – SNS + Lambda
https://stackabuse.com/publishing-and-subscribing-to-aws-sns-messages-with-node-js/
How to handle AWS SES bounces and complaints
https://medium.com/@serbanmihai/how-to-handle-aws-ses-bounces-and-complaints-53d6e7455443
mihaiserban/aws.js
https://gist.github.com/mihaiserban/8a03fd28e54cac8856dbdfebd95bd7b3
handle-email-bounces-aws-ses – bounces.js (How to Handle Email Bounces on AWS SES)
https://github.com/bind-almir/handle-email-bounces-aws-ses/blob/master/bounces.js
SNS to SQS to Lambda trigger
How to handle AWS SES bounces and complaints – By email feedback forwarding Flow
https://medium.com/@serbanmihai/how-to-handle-aws-ses-bounces-and-complaints-53d6e7455443
Expressjs route accepting the notifications for bounced emails SNS+SES+Expressjs – Create Domain
https://trentmillar.github.io/amazon-ses-email/2016/12/23/amazon-ses-notifications-sent-to-httphttps-service-using-sns-and-nodejs
SQS + Expressjs – Send & Receive Message
https://www.bogotobogo.com/DevOps/AWS/aws-Amazon-SQS-Simple-Queue-Service-with-NodeJS-AWS-SDK.php
SQS + Expressjs – Simple Queue Service (SQS) Tutorial NodeJS + AWS SDK
https://github.com/Einsteinish/aws-sqs-node-js-example/blob/master/app.js
Send Emails Using AWS SES & Lambda Functions
https://www.jobsity.com/blog/tutorial-send-emails-using-aws-ses-lambda-functions
csv importer
https://github.com/thombergs/code-examples/tree/master/nodejs/node-csv-importer
Delete Queue Command – sqs client
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sqs/classes/deletequeuecommand.html
Guide to Sending Messages to an SQS Queue With Lambda
https://code.likeagirl.io/guide-to-sending-messages-to-an-sqs-queue-with-lambda-758cf782cb83
i project structure is , aws ses email to client , ses is connected with aws SNS and the SNS push the email response to aws SQS and the SQS is triggering aws Lambda
messageId
receiptHandle
body.Message
body.Type
body.MessageId
body.TopicArn
body.Message
body.UnsubscribeURL
attributes
messageAttributes
eventSourceARN
How can I set up Amazon SES bounce notifications using an Amazon SNS topic?
https://repost.aws/knowledge-center/ses-bounce-notifications-sns
Handling Bounces and Complaints at Amazon SES + SQS
https://blog.awsfundamentals.com/handling-bounces-complaints-at-aws-ses
Handling Email Bounces using AWS – .Net
How to Handle bounce, complains using Amazon SES and Serverless Framework Part1
How to Handle bounce, complaint using AmazonSES and Serverless Framework Part2
AWS SES, SNS, CloudWatch Integration with Node.js
https://aws.plainenglish.io/aws-ses-sns-cloudwatch-integration-with-node-js-bf159a2de103
How do I configure SES and SNS to receive domain validation emails?
How to Get Out of Amazon SES Sandbox
Remove AWS SES Account From Sandbox Step by Step Complete Guidance, AWS Simple Email Service Sandbox
How to Handle Email Bounces on AWS SES
https://almirzulic.com/posts/how-to-handle-email-bounces-on-aws-ses/
https://github.com/bind-almir/handle-email-bounces-aws-ses/blob/master/README.md
Monitoring your Email Bounces and Bounce Rate using Amazon SES, Lambda, SNS and DynamoDB
https://edicasoft.com/weblog/2020/11/11/monitoring-your-email-bounces-and-bounce-rate-using-amazon-ses-lambda-sns-and-dynamodb/
AWS Serverless Examples – AWS Lambda Templates
https://github.com/serverless/examples
https://github.com/serverless/examples/blob/v3/aws-node-mongodb-atlas/handler.js
GIT :
dwyl/aws-ses-lambda
https://github.com/dwyl/aws-ses-lambda/blob/master/index.js
andanhm/amazon_ses – Full SMS Bounce Code in Angular
https://github.com/andanhm/amazon_ses/tree/master/src
https://gist.github.com/mihaiserban/8a03fd28e54cac8856dbdfebd95bd7b3
E-commerce | Serverless | “Nic Juice 2 Japan”
https://github.com/TobiahRex/E-commerce-Serverless
bind-almir/handle-email-bounces-aws-ses – Serverless.yml for SQS
https://github.com/bind-almir/handle-email-bounces-aws-ses/blob/master/serverless.yml
—
Setting AWS SES Bounce Notification
https://www.tothenew.com/blog/setting-aws-ses-bounce-notification/
How do I store Amazon SNS notifications for Amazon SES emails in DynamoDB using Lambda?
https://repost.aws/knowledge-center/lambda-sns-ses-dynamodb
SNS: How to configure SNS service with Email || Subscribe SNS topic With Email
AWS SNS ( Simple Notification Service ) with SQS and EMAIL | Hands on Demo
——
SNS Topic ARN
========
Bounce arn:aws:sns:ap-south-1:xxxxxxxx:email-bounces
Complaint arn:aws:sns:ap-south-1:xxxxxxxx:email-complaints
Delivery arn:aws:sns:ap-south-1:xxxxxxxx:email-deliveries
SQS ARN
=======
Queue Name : SNSBounceQueue
arn:aws:sqs:ap-south-1:xxxxxxxx:SNSBounceQueue
URL : https://sqs.ap-south-1.amazonaws.com/xxxxxxxx/SNSBounceQueue
Subscription ARN :
arn:aws:sns:ap-south-1:xxxxxxxx:email-complaints:xxxxxxxx
arn:aws:sns:ap-south-1:xxxxxxxx:email-bounces:xxxxxxxx
arn:aws:sns:ap-south-1:xxxxxxxx:email-deliveries:xxxxxxxx
—–
success@simulator.amazonses.com.
bounce@simulator.amazonses.com.
complaint@simulator.amazonses.com.
ooto@simulator.amazonses.com.
suppressionlist@simulator.amazonses.com.
Amazon SES with handling Bounces and Complaints
This is a dome project to send email with attachment using Amazon SES and handling email matrix (Bounces,Complaints and Delivery) by configuring Amazon SNS consuming through SQS
AWS SES without SQS
https://github.com/andanhm/amazon_ses/blob/master/script/postman/Amazon-SES.postman_collection
AWS SES with SQS
https://github.com/andanhm/amazon_ses/blob/master/src/index.js
—–
Getting Started with AWS Lambda and Node.js – Zip File
https://stackabuse.com/getting-started-with-aws-lambda-and-node-js/
Deploying Node.js Apps to AWS EC2 with Docker
https://stackabuse.com/deploying-node-js-apps-to-aws-ec2-with-docker/
Ask the Expert: 13 AWS Lambda design considerations you need to know about
https://www.jeffersonfrank.com/insights/aws-lambda-design-considerations
Using SQS with AWS Lambda and Serverless
https://www.serverless.com/blog/aws-lambda-sqs-serverless-integration
How did I process half a million transactions in AWS Lambda within minutes?
https://dev.to/aws-builders/how-did-i-processed-half-a-million-transactions-in-aws-lambda-within-minutes-ch2
AWS Lambda SQS events with Serverless Framework
https://www.codementor.io/@marcinpiczkowski/aws-lambda-sqs-events-with-serverless-framework-lukrotbg4
—–
You can get the number of processor cores using this lambda function:
exports.handler = async (event) => {
const rspMsg = ‘Number of CPU cores: ‘ + require(‘os’).cpus().length;
console.log(rspMsg);
return {
statusCode: 200,
body: rspMsg,
};
};
—–
95. SQS – Q&A
How To: Use SNS and SQS to Distribute and Throttle Events
https://www.jeremydaly.com/how-to-use-sns-and-sqs-to-distribute-and-throttle-events/
Free AWS Solutions Architect Certification Exam Questions[2023]
https://www.whizlabs.com/blog/aws-solutions-architect-associate-exam-questions/
pushing messages from amazon sqs to mongodb nodejs
Send Message to SQS from AWS Lambda using Node js 18
Building a 3-tier web application architecture with AWS
https://medium.com/@aaloktrivedi/building-a-3-tier-web-application-architecture-with-aws-eb5981613e30
How can I set up Amazon SES bounce notifications using an Amazon SNS topic?
https://repost.aws/knowledge-center/ses-bounce-notifications-sns
AWS SES Email Setup and Send Emails 2023 | How to Send Emails using AWS SES without Coding -Tutorial – Magnetic Mailer
AWS SDK for JavaScript v3
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sqs/
https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-sqs/#:~:text=Amazon%20SQS%20is%20a%20reliable,helps%20you%20decouple%20these%20components.
Getting Started with Amazon SQS – SQS Details
https://reflectoring.io/getting-started-with-aws-sqs/
Create a Serverless Application with SNS SQS and Lambda
Triggering AWS Lambda with SQS message using Serverless Framework
———-
https://github.com/serverless/examples/blob/v3/aws-node-sqs-worker/index.js
https://github.com/serverless/examples/blob/22865199326008b9f863cb1ad28bfdddae9a7473/aws-node-rest-api-mongodb/handler.js
https://github.com/andanhm/amazon_ses/blob/master/src/services/bounce.handling.js