Reputation: 609
When I get the bounce event in the SNS I want to retrieve extra data regarding this email. I only have the messageID.
Is there a way to add custom header to SendEmail API?
Is there another way to retrieve custom data of specific email? I dont want to write to DB because it causes me performance issues when writing to DB whenever I send an email. I send millions email per day.
Thanks!
Upvotes: 0
Views: 589
Reputation: 4482
You could set Tags
within your sendEmail
request.
In case of a Bounce
you are getting the tags back
{
"eventType": "Bounce",
"bounce": {
"bounceType": "Permanent",
[...]
},
"mail": {
[...]
"tags": {
"ExampleTagName": ["ExampleTagValue"]
}
}
}
Upvotes: 0
Reputation: 10567
Using the bounce object, you already have access to the bounce type, bounce subtype, bounced recipients and timestamp data.
However, if you need more fine-grained detailed monitoring for the bounce event using Amazon CloudWatch or Amazon Kinesis Firehose, you can apply one or more message tags (as an array) to the emails you send. See Monitoring Using Event Publishing.
Upvotes: 1