Setting Up Amazon SES Email Authentication
Complete guide to configuring SPF, DKIM, and DMARC for Amazon SES transactional emails.
Setting Up Amazon SES Email Authentication
Amazon SES (Simple Email Service) is AWS's transactional email service. This guide covers setting up SPF, DKIM, and DMARC for Amazon SES.
Prerequisites
- AWS account with SES access
- Domain verified in Amazon SES
- Access to your domain's DNS settings (Route 53 or external)
- MailSentinel account for DMARC monitoring
Overview
Amazon SES requires:
- SPF - Authorize Amazon SES to send emails
- DKIM - Sign emails with Amazon SES keys
- DMARC - Monitor and enforce authentication
Step 1: Verify Domain in Amazon SES
- Log in to AWS Console
- Navigate to Amazon SES
- Go to Verified identities → Create identity
- Select Domain
- Enter your domain (e.g.,
example.com) - Choose verification method:
- DNS verification (recommended)
- Email verification (for testing)
Step 2: Configure SPF for Amazon SES
Get Amazon SES SPF Include
Amazon SES provides this SPF include:
include:amazonses.comBuild Your SPF Record
If Amazon SES is your only email service:
v=spf1 include:amazonses.com -allIf you use other services (Google Workspace, etc.):
v=spf1 include:_spf.google.com include:amazonses.com -allImportant: Only ONE SPF record per domain. Merge all includes into a single record.
Add SPF Record to DNS
If using Route 53:
- Go to Route 53 → Hosted zones
- Select your domain
- Create TXT record:
- Name: (blank for root domain)
- Value: Your complete SPF record
- TTL: 3600
If using external DNS:
- Add TXT record at your DNS provider
- Host:
@or leave blank - Value: Your complete SPF record
- TTL: 3600
Verify SPF Setup
- In SES console, check domain verification status
- Use MailSentinel to verify SPF record
- Use MXToolbox SPF checker
Step 3: Configure DKIM for Amazon SES
Enable DKIM in SES
- In SES console, go to Verified identities
- Select your domain
- Go to DKIM tab
- Click Edit
- Select Easy DKIM
- Choose CNAME record type (recommended) or TXT
Get DKIM Records from SES
SES provides DKIM records like:
For CNAME records (recommended):
Host: xyz123._domainkey
Type: CNAME
Value: xyz123.dkim.amazonses.com
Host: abc456._domainkey
Type: CNAME
Value: abc456.dkim.amazonses.com
Host: def789._domainkey
Type: CNAME
Value: def789.dkim.amazonses.com
For TXT records (alternative):
Host: xyz123._domainkey
Type: TXT
Value: p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC...
Add DKIM Records to DNS
If using Route 53:
-
Go to Route 53 → Hosted zones
-
Select your domain
-
For each DKIM record:
- Create CNAME record
- Name:
xyz123._domainkey(use SES-provided name) - Value:
xyz123.dkim.amazonses.com(use SES-provided value) - TTL: 3600
-
Repeat for all 3 DKIM records
If using external DNS:
- Add CNAME records at your DNS provider
- Host:
xyz123._domainkey(from SES) - Value:
xyz123.dkim.amazonses.com(from SES) - TTL: 3600
- Repeat for all 3 records
Verify DKIM Setup
In SES Console:
- DKIM status should show "Verified"
- May take 15-60 minutes to verify
- All 3 records must be published
Manual Verification:
- Send test email through SES
- Check email headers
- Look for
DKIM-Signatureheader - Verify signature is valid
Step 4: Configure DMARC for Amazon SES
Get Your MailSentinel Report Address
- Log in to MailSentinel
- Add your domain
- Go to Settings → DMARC Configuration
- Copy report address:
your-org-id@reports.mailsentinel.io
Create DMARC Record
Starting with monitoring:
v=DMARC1; p=none; rua=mailto:your-org-id@reports.mailsentinel.ioAfter monitoring (quarantine):
v=DMARC1; p=quarantine; rua=mailto:your-org-id@reports.mailsentinel.io; adkim=r; aspf=rFull protection:
v=DMARC1; p=reject; rua=mailto:your-org-id@reports.mailsentinel.io; ruf=mailto:your-org-id@forensic.mailsentinel.io; adkim=r; aspf=rAdd DMARC Record to DNS
If using Route 53:
- Go to Route 53 → Hosted zones
- Select your domain
- Create TXT record:
- Name:
_dmarc - Value: Your complete DMARC record
- TTL: 3600
- Name:
If using external DNS:
- Add TXT record at your DNS provider
- Host:
_dmarc - Value: Your complete DMARC record
- TTL: 3600
Verify DMARC Setup
- Use MailSentinel to check DNS
- Verify DMARC record is detected
- Wait 24-48 hours for first reports
- Monitor in MailSentinel dashboard
Amazon SES-Specific Considerations
SES Configuration Sets
For Advanced Tracking:
- Use configuration sets for event tracking
- Doesn't affect SPF/DKIM/DMARC
- Useful for monitoring
SES Sending Limits
Sandbox Mode:
- Limited to 200 emails/day
- Can only send to verified emails
- Request production access for higher limits
Production Mode:
- Higher sending limits
- Can send to any email
- Requires request approval
SES IP Addresses
Shared IP Pools:
- SES uses shared IP pools by default
- Don't add individual IPs to SPF
- Use
include:amazonses.cominstead
Dedicated IPs:
- Available for higher volume
- May need to add IPs to SPF
- Check SES documentation for IP ranges
SES Regions
Multi-Region Setup:
- SES available in multiple AWS regions
- SPF/DKIM/DMARC work across regions
- No additional configuration needed
Common Amazon SES Configurations
SES Only
SPF:
v=spf1 include:amazonses.com -allDKIM: Configure in SES console (3 CNAME records)
DMARC:
v=DMARC1; p=none; rua=mailto:your-org-id@reports.mailsentinel.ioSES + Google Workspace
SPF:
v=spf1 include:_spf.google.com include:amazonses.com -allDKIM: Configure both Google Workspace and SES DKIM
DMARC: Same as above, covers both services
SES + Multiple Services
SPF:
v=spf1 include:_spf.google.com include:amazonses.com include:sendgrid.net -allDKIM: Configure for each service
DMARC: Single DMARC policy covers all
Troubleshooting Amazon SES Issues
Issue 1: SPF Not Working
Symptoms:
- Emails failing SPF check
- SES shows authentication errors
Solutions:
- Verify SPF record includes
include:amazonses.com - Check only one SPF record exists
- Verify DNS propagation (wait 15-60 minutes)
- Use SPF checker to validate
Issue 2: DKIM Not Signing
Symptoms:
- No DKIM signature in headers
- SES shows DKIM not verified
Solutions:
- Verify all 3 DKIM CNAME records are published
- Check selectors match SES's expectation
- Wait for DNS propagation
- Verify domain is verified in SES
- Check for typos in DNS records
Issue 3: DMARC Failures
Symptoms:
- DMARC reports show failures
- Emails going to spam
Solutions:
- Verify SPF alignment
- Verify DKIM alignment
- Check From: domain matches verified domain
- Review DMARC reports for details
- Fix underlying SPF/DKIM issues
Issue 4: Domain Not Verifying
Symptoms:
- SES shows domain not verified
- DNS records not detected
Solutions:
- Wait 15-60 minutes for DNS propagation
- Verify DNS records are at correct location
- Check for typos in records
- Ensure nameservers are correct
- Try removing and re-adding domain
Best Practices for Amazon SES
1. Use Dedicated Subdomain
For Transactional Email:
- Use subdomain like
mail.example.comornotify.example.com - Isolates reputation
- Easier to manage
SPF for Subdomain:
mail.example.com TXT "v=spf1 include:amazonses.com -all"2. Monitor Authentication
Key Metrics:
- SPF pass rate (target: 95%+)
- DKIM pass rate (target: 95%+)
- DMARC pass rate (target: 95%+)
- Bounce rate (target: <5%)
- Complaint rate (target: <0.1%)
3. Use SES Configuration Sets
Benefits:
- Track email events
- Monitor bounces and complaints
- Set up CloudWatch alarms
- Better visibility
4. Regular Audits
Quarterly Reviews:
- Check SPF includes still needed
- Verify DKIM keys are valid
- Review DMARC reports
- Update records as needed
5. Use MailSentinel for Monitoring
Benefits:
- Centralized DMARC monitoring
- Alerts for authentication failures
- Detailed reporting
- Progress tracking
Amazon SES API Integration
Sending Emails via API
Authentication:
- SES API uses same domain authentication
- SPF/DKIM/DMARC apply to API emails
- No additional configuration needed
SDK Usage
Example (Node.js):
const AWS = require('aws-sdk');
const ses = new AWS.SES({ region: 'us-east-1' });
const params = {
Source: 'noreply@example.com',
Destination: { ToAddresses: ['user@example.com'] },
Message: {
Subject: { Data: 'Test Email' },
Body: { Text: { Data: 'Hello from SES!' } }
}
};
ses.sendEmail(params).promise();Next Steps
After setting up Amazon SES authentication:
- Monitor DMARC Reports - Track authentication status
- Set Up Alerts - Get notified of issues
- Review Best Practices - Optimize deliverability
- Troubleshoot Issues - Fix any problems
Additional Resources
- Amazon SES Documentation - Official AWS SES guides
- SES Domain Verification - Domain setup guide
- SES DKIM Setup - DKIM configuration
- SPF Configuration Guide - Complete SPF setup
- DKIM Configuration Guide - Complete DKIM setup
- DMARC Configuration Guide - Complete DMARC setup