Skip to content

How do I monitor Amazon SES email delivery delays?

3 minute read
0

I want to monitor and troubleshoot email delivery delays when I send emails through Amazon Simple Email Service (Amazon SES).

Short description

You can experience email delivery delays with Amazon Simple Email Service (Amazon SES) at the following three stages of the sending process:

  1. When your client application sends your message to Amazon SES.
  2. When your message is inside Amazon SES.
  3. When Amazon SES sends your message to the recipient's mail transfer agent (MTA).

Resolution

Monitor your email delivery delays, and then troubleshoot the delays that you find.

Monitor delays between the client application and Amazon SES

Activate Amazon SES logs in your email client. Compare the following timestamps:

  • When you begin the email sending process.
  • When the client application initiates API calls to Amazon SES.
  • When you receive a response from Amazon SES that contains your message ID.

If you encounter a significant delay, then investigate your application's logs and infrastructure for potential issues.

Monitor delays between Amazon SES and recipient mail servers

To use event publishing to monitor delays when Amazon SES sends an email to the recipient's MTA, complete the following steps:

  1. Create a configuration set.
  2. Create an event destination.
    For Event Type, select Delivery Delays.
    For Destination Type, select Amazon Data Firehose, Amazon EventBridge, or Amazon Simple Notification Service (Amazon SNS).
    Important: Amazon Pinpoint and Amazon CloudWatch don't support DeliveryDelay events.
  3. Add your event destination to your configuration set.
  4. Specify your configuration set.

When event publishing is active and delivery delays occur, Amazon SES publishes DeliveryDelay events to the destination that you choose. The events that you receive contain the following pieces of information:

  • The time that the delay occurs
  • The type of delay, for example TransientCommunicationFailure
  • The time that the delay expires
  • The delayed email's recipients, including email addresses, status codes, and diagnostic codes

The following example contains a DeliveryDelay event's JSON data:

{  
"eventType": "DeliveryDelay",  
"mail": {  
"timestamp": "2020-06-16T00:15:40.641Z",  
"source": "[EMAIL]",  
"sourceArn": "arn:aws:ses:us-east-1:123456789012:identity/[EMAIL]",  
"sendingAccountId": "123456789012",  
"messageId": "EXAMPLE7c191be45-e9aedb9a-02f9-4d12-a87d-dd0099a07f8a-000000",  
"destination": [  
"[EMAIL]"  
],  
"headersTruncated": false,  
"tags": {  
"ses:configuration-set": [  
"ConfigSet"  
]  
}  
},  
"deliveryDelay": {  
"timestamp": "2020-06-16T00:25:40.095Z",  
"delayType": "TransientCommunicationFailure",  
"expirationTime": "2020-06-16T00:25:40.914Z",  
"delayedRecipients": [  
{  
"emailAddress": "[EMAIL]",  
"status": "4.4.1",  
"diagnosticCode": "smtp; 421 4.4.1 Unable to connect to remote host"  
}  
]  
}  
}

Monitor delays inside Amazon SES

If you don't discover delays in the preceding stages of the delivery process, then reach out to AWS Support to investigate delays inside Amazon SES. Include the following details in your request:

  • The AWS region that Amazon SES used
  • The sending identity's ARN
  • The Message ID

If you don't have the Message ID, then include the following details:

  • The From address
  • The Recipient address
  • The date and time that you sent the email

Related information

Amazon SES can now send notifications when the delivery of an email is delayed