Architecture - mmattioli/aws-email-forwarding GitHub Wiki

The architecture for this solution is composed of SES, S3, and Lambda.

Email forwarding architecture

  1. SES receives an inbound email. SES then performs steps 2 and 3 as part of its receipt rule.
  2. SES stores the email object in the S3 bucket.
  3. SES triggers the Lambda function to run.
  4. The Lambda function then
    1. Retrieves the email object from the S3 bucket.
    2. Composes a new email.
    3. Attaches the received email (which it just pulled from the S3 bucket) to the new email it is composing.
    4. Sends this new email out through SES (to the final destination email address).
  5. The email is received on your mail server (wherever the destination email address is).