I want to review my email sending history in Amazon Simple Email Service (Amazon SES).
Resolution
Use Amazon OpenSearch Service and Amazon Data Firehose to store and view your Amazon SES sending history.
Create an OpenSearch Service domain
Create an OpenSearch Service domain to store your Amazon SES sending history. You can place the OpenSearch Service domain in a public network or Amazon Virtual Private Cloud (Amazon VPC). For more information on the type of network to use for your OpenSearch Service domain, see VPC and public domains.
Create a Firehose delivery stream
Complete the following steps:
- Open the Firehose console, and then choose Create Firehose stream.
- For Source, select Direct PUT.
- For Destination, select Amazon OpenSearch Service.
- For Firehose stream name, enter a name for your stream.
- (Optional) You can select Turn on data transformation, or keep this setting as unchecked.
- Under Destination settings, enter the following information:
For OpenSearch Service domain, select the domain that you created to store your Amazon SES sending history.
For Index, enter an index name.
For Index rotation, choose a rotation schedule. Or, keep the field with the default No rotation setting.
For Type, enter a type name.
For Retry duration, modify the retry duration in seconds. Or, keep the field with the default 300 seconds.
- For Buffer hints, configure OpenSearch Service buffer conditions for your use case. For more information on these fields, see Configure advanced settings.
- Under Backup settings, enter the following information:
Keep Failed data only as the default setting.
For S3 backup bucket, choose to store the records in an existing bucket. Or, choose Create to create a new bucket.
(Optional) For S3 backup bucket prefix, enter a prefix. Or, keep this field blank.
(Optional) For S3 backup bucket error output prefix, enter a prefix. Or, keep this field blank.
- (Optional) You can expand the Advanced settings tab to configure server-side encryption, CloudWatch error logging, permissions, and tags. Configure the settings for your use case. For more information on these fields, see Configure advanced settings.
- Choose Create Firehose stream.
Create an Amazon SES configuration set
Complete the following steps:
- Open the Amazon SES console, and then choose Configuration sets from the navigation pane.
- Choose Create set.
- For Configuration set name, enter a name for the set.
- For Sending IP pool, select your preferred pool or default, and then choose Create set.
- Choose the Event destinations tab, and then choose Add destination.
- For Event types, select Sends, Rejects, Deliveries, Hard bounces, and Complaints. Then, choose Next.
- For Destination options, select Amazon Kinesis Data Firehose.
- In the Name field, enter a destination name.
- For Delivery stream, select the delivery stream that you created.
- For Identity and Access Management (IAM) Role, choose a role that grants permission for Amazon SES to publish to your Firehose delivery stream. Then, choose Next.
Note: This must be a manually created AWS Identity and Access Management (IAM) role.
- Review your event destination settings, and then choose Add destination.
Test your configuration
Complete the following steps:
- Use the Amazon SES console to send a test email with the mailbox simulator.
Important: To see the results of the test email, you must specify the configuration set that you created.
For Email Format, select Formatted.
For Configuration set, enter the name of the configuration set.
- Open the OpenSearch Service console.
- In the navigation pane, choose Domains.
- Choose the domain that you created to store your Amazon SES sending history.
- In the General information section, select the link next to OpenSearch dashboards URL.
- Create an index pattern for the index name that you configured when you created the delivery stream. For instructions, see Create a data view on the Elastic website.
- After you create the index pattern, use the Discover feature in OpenSearch Dashboards to view the log of the test email that you sent. For more information, see Discover on the Elastic website.
Related information
Monitoring your Amazon SES sending activity
How do I troubleshoot CloudWatch Logs so that it streams to my OpenSearch Service domain?