Simulating SES Bounce, Complaint, and Reject Events
This note describes how to simulate SES bounce, complaint, and reject events. For more details, refer to the official documentation.
This note describes how to simulate SES bounce, complaint and reject. Fore more details, refer to the official documentation.
Prerequisites
Ensure you have completed the following steps before starting:
- Register an email address in your AWS SES.
- Enable Email Feedback Forwarding for the registered email address.

Simulating Bounce
Use the following command to simulate a bounce:
aws ses send-email \ --from <YOUR_EMAIL> \ --to bounce@simulator.amazonses.com \ --subject test \ --text testYou will receive an email at the address specified by the --from option, indicating a bounce occurred.

Simulating Complaint
Use the following command to simulate a complaint:
aws ses send-email \ --from <YOUR_EMAIL> \ --to complaint@simulator.amazonses.com \ --subject test \ --text testAn email indicating a complaint will be sent to the --from address.

Simulating Reject
To simulate a reject, send an email with an EICAR test file attachment using the following script:
FROM=<YOUR_EMAIL>MESSAGE='{"Data": "From: $FROM\nTo: $FROM\nSubject: test\nMIME-Version: 1.0\nContent-type: Multipart/Mixed; boundary=\"NextPart\"\n\n--NextPart\nContent-Type: text/plain\n\ntest\n\n--NextPart\nContent-Type: text/plain;\nContent-Disposition: attachment; filename=\"sample.txt\"\n\nX5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*\n\n--NextPart--"}'MESSAGE=$(echo $MESSAGE | sed "s/\$FROM/$FROM/g")aws ses send-raw-email \ --cli-binary-format raw-in-base64-out \ --raw-message "$MESSAGE"You will receive a rejection notification email at the FROM address.

Related posts
Sign in with Slack Using Cognito User Pools and OIDC
This note describes how to federate Cognito user pools with Slack using OIDC to implement "Sign in with Slack".
Deploying FastAPI on AWS Lambda with Lambda Web Adapter
This example guides you through the process of developing API backends with FastAPI using Lambda Web Adapter.
API Gateway WebSocket: Implementing a Mock Integration
This note describes how to build an API Gateway WebSocket endpoint using mock integration.
Uploading to S3 Through CloudFront Pre-Signed URLs
CloudFront signed URLs let you upload to S3 through a custom domain—useful when direct S3 pre-signed URLs are not an option.
AWS EventBridge Scheduler: Automate EC2 Scheduling with Ease
This note describes how to automate starting and stopping of EC2 instances using EventBridge Scheduler.
