ワンクリックで
aws-ses-inbound
Set up AWS SES for receiving inbound emails with SNS webhook delivery
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Set up AWS SES for receiving inbound emails with SNS webhook delivery
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Debug production issues on Vercel using logs, database inspection, and proper deployment waiting
Make features testable by design. Testing pyramid from fast (local) to slow (UI). Expose APIs securely for testing.
Manage DNS records for domains hosted on Vercel using the Vercel CLI
Workspace guide to introduce OpenWork and onboard new users.
Access and update company administrative information stored in Notion
Create and register new OpenCode skills in this repo
| name | aws-ses-inbound |
| description | Set up AWS SES for receiving inbound emails with SNS webhook delivery |
| license | MIT |
| compatibility | opencode |
| metadata | {"service":"aws","category":"email"} |
complete when the rule set is active and SNS shows confirmed subscription.continue when awaiting DNS verification or subscription confirmation.error on permission failures or invalid credentials.Set up Amazon SES (Simple Email Service) for receiving inbound emails and forwarding them to a webhook via SNS (Simple Notification Service). This is commonly used for:
brew install awscli or pip install awscliSet credentials via environment variables:
export AWS_ACCESS_KEY_ID='AKIA...'
export AWS_SECRET_ACCESS_KEY='...'
export AWS_DEFAULT_REGION='us-east-1'
Or use AWS CLI profile:
aws configure --profile ses-admin
export AWS_PROFILE=ses-admin
SES inbound email is only available in:
us-east-1 (N. Virginia)us-west-2 (Oregon)eu-west-1 (Ireland)# Register domain for verification
aws ses verify-domain-identity --domain example.com
# Response includes VerificationToken - add as TXT record:
# Name: _amazonses.example.com
# Value: <VerificationToken>
# Get DKIM tokens for email authentication
aws ses verify-domain-dkim --domain example.com
# Response includes 3 DkimTokens - add as CNAME records:
# Name: <token>._domainkey.example.com
# Value: <token>.dkim.amazonses.com
# Create topic for receiving email notifications
aws sns create-topic --name my-inbound-email-topic
# Save the TopicArn from response
# Create a rule set (container for rules)
aws ses create-receipt-rule-set --rule-set-name my-email-rules
# Create rule to forward emails to SNS
aws ses create-receipt-rule \
--rule-set-name my-email-rules \
--rule '{
"Name": "forward-to-sns",
"Enabled": true,
"Recipients": ["example.com"],
"Actions": [
{
"SNSAction": {
"TopicArn": "arn:aws:sns:us-east-1:123456789:my-inbound-email-topic",
"Encoding": "UTF-8"
}
}
],
"ScanEnabled": true
}'
# Only one rule set can be active at a time
aws ses set-active-receipt-rule-set --rule-set-name my-email-rules
# Subscribe your HTTPS endpoint to the SNS topic
# IMPORTANT: Use --notification-endpoint, NOT --endpoint
# (--endpoint overrides the AWS API URL, which is NOT what you want)
aws sns subscribe \
--topic-arn "arn:aws:sns:us-east-1:123456789:my-inbound-email-topic" \
--protocol https \
--notification-endpoint "https://example.com/api/email-webhook"
Important: Your webhook endpoint must handle the SNS subscription confirmation request. SNS sends a POST with:
x-amz-sns-message-type: SubscriptionConfirmationType, SubscribeURL, Token, etc.Your endpoint must visit the SubscribeURL (make a GET request) to confirm the subscription.
After running the SES commands, add these DNS records:
Name: _amazonses.example.com
Type: TXT
Value: <VerificationToken from verify-domain-identity>
Name: <token1>._domainkey.example.com
Type: CNAME
Value: <token1>.dkim.amazonses.com
Name: <token2>._domainkey.example.com
Type: CNAME
Value: <token2>.dkim.amazonses.com
Name: <token3>._domainkey.example.com
Type: CNAME
Value: <token3>.dkim.amazonses.com
Name: example.com (or subdomain like mail.example.com)
Type: MX
Priority: 10
Value: inbound-smtp.<region>.amazonaws.com
For us-east-1: inbound-smtp.us-east-1.amazonaws.com
aws ses get-identity-verification-attributes --identities example.com
# VerificationStatus should be "Success"
aws ses get-identity-dkim-attributes --identities example.com
# DkimVerificationStatus should be "Success"
aws ses describe-active-receipt-rule-set
aws ses describe-receipt-rule --rule-set-name my-email-rules --rule-name forward-to-sns
aws sns list-subscriptions-by-topic --topic-arn "arn:aws:sns:..."
# SubscriptionArn should show confirmed ARN, not "PendingConfirmation"
SNS sends JSON with this structure:
{
"Type": "Notification",
"MessageId": "...",
"TopicArn": "arn:aws:sns:...",
"Message": "{\"notificationType\":\"Received\",\"content\":\"<raw MIME email>\",...}",
"Timestamp": "...",
"Signature": "...",
"SigningCertURL": "..."
}
The Message field contains a JSON string with:
notificationType: "Received" for incoming emailscontent: Raw MIME email content (needs parsing)mail: Metadata (messageId, source, destination, headers)Use a library like mailparser (Node.js) or email (Python) to parse the MIME content.
When you first subscribe, SNS sends a confirmation request:
{
"Type": "SubscriptionConfirmation",
"SubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=ConfirmSubscription&...",
"Token": "...",
"TopicArn": "..."
}
Your webhook must:
Type === "SubscriptionConfirmation"SubscribeURLAlways verify SNS message signatures in production:
SigningCertURL is from *.amazonaws.comdig _amazonses.example.com TXTdig <token>._domainkey.example.com CNAMEAmazonSESFullAccess and AmazonSNSFullAccess policies