I get stuck at Step 12
Steps
- Create a Simple Email Service (SES) domain identity, your.domain, in one of the AWS regions supporting email receiving
- Verify domain identity
- Verified identities in Amazon SES - Amazon Simple Email Service
- Verifying your domain for Amazon SES email receiving - Amazon Simple Email Service
- Create a Simple Notification Service (SNS) topic, feedback-sns-topic, for feedback notifications
- Configure the your.domain domain identity
a. Enable email feedback forwarding
b. Configure bounce and complaint (not delivery) feedback notifications to use SNS feedback-sns-topic topic - Create a subscription on the SNS feedback-sns-topic topic
a. Protocol is HTTPS (you’re not still using HTTP are you?)
b. Set endpoint to https://your.domain/webhooks/aws (see VERP post )
c. Select enable raw message delivery - Create another SNS topic, incoming-sns-topic, for incoming email
- Create an SES email receiving rule set, inbound-mail-set, if there isn’t an existing active one. If so use that as there can only be one active rule set
- Create a receipt rule in the inbound-mail-set receiving rule set
a. Set recipient condition to your.domain
b. Add action to publish to SNS topic incoming-sns-topic, encoding Base64 - Create API key in your Discourse instance for user system, granting receive email action on the email resource
- Create a secret in Secret Manager, email-handler-secret, with the following keys and their respective values:
- api_endpoint - https://your.domain/admin/email/handle_mail
- api_key - from step 9
- api_username - system, unless you used something different in step 9
- Create a Lambda layer, lambda-receiver-layer, for the python3.10 runtime containing the requests and aws-lambda-powertools libraries
- Create a lambda function, email-receiver-lambda, for the python3.10 runtime with the receiver code: