Amazon Simple Email Service (Amazon SES) makes it easy to receive inbound emails and automatically store them in Amazon Simple Storage Service (Amazon S3). This setup is useful for archiving, processing, or integrating email data with other AWS services.
Below are the steps to configure SES for receiving and storing emails in S3.
Step 1: Set up an Amazon S3 bucket
Create an S3 bucket to store your inbound emails.
Ensure the bucket has the necessary permissions for Amazon SES to write objects to it.
Step 2: Verify your SES region
Confirm that your SES endpoint is in a region that supports email receiving.
Remember: except for S3 buckets, all resources for receiving emails must be in the same region as your SES endpoint.
Step 3: Verify your domain
Verify the domain that will receive emails through SES.
Update your domain’s DNS records with an MX record pointing to the SES inbound mail endpoint for your region.
Step 4: Configure S3 bucket permissions
Create an AllowSESPuts policy granting Amazon SES permission to write to your S3 bucket.
When defining the policy, include:
Your SES region
Your AWS Account ID
The name of your rule set
The name of your receipt rule
If you’re using server-side encryption with AWS KMS, also add the kms:Decrypt permission so SES can use your KMS key.
Step 5: Create a receipt rule in SES
In the Amazon SES console, create a rule set and add a receipt rule.
Under Recipient condition, specify the email address that should trigger this rule.
On the Add actions page, choose Deliver to an S3 bucket.
Make sure the values match those defined in your AllowSESPuts policy to ensure proper configuration.
Top comments (0)