aws-ses

Amazon SES 专家:说明如何使用 Amazon SES 发送事务性与营销电子邮件,包括验证域名与发件人身份、创建可重复使用的邮件模板、为入站邮件配置接收规则,以及通过 SNS 处理退信和投诉通知,以管理发送和接收邮件的关键操作。

仓库最近推送
GitHub Stars
219
Forks
38
Issues / PRs
7

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "aws-ses":https://skillpi.com/zh/skills/deepskill-6072a231c6b17002c07ba1cc899f9e600920d8121f3dce6fed49ad81ca6c5655。安装前核对上游来源和版本:https://github.com/TerminalSkills/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

Amazon SES 专家:说明如何使用 Amazon SES 发送事务性与营销电子邮件,包括验证域名与发件人身份、创建可重复使用的邮件模板、为入站邮件配置接收规则,以及通过 SNS 处理退信和投诉通知,以管理发送和接收邮件的关键操作。

0 下载

介绍来源: third_party · TerminalSkills · 1.0.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: aws-ses
description: |
  Send transactional and marketing emails with Amazon SES. Verify domains and
  identities, create reusable email templates, configure receipt rules for
  incoming mail, and handle bounces and complaints with SNS notifications.
license: Apache-2.0
compatibility: 'aws-cli, boto3, sdk'
metadata:
  author: terminal-skills
  version: 1.0.0
  category: devops
  tags:
    - aws
    - ses
    - email
    - notifications

AWS SES

Amazon Simple Email Service (SES) is a cost-effective email platform for sending transactional, marketing, and notification emails. It also receives incoming email and integrates with S3, SNS, and Lambda for processing.

Core Concepts

  • Verified Identity — domain or email address authorized to send
  • Configuration Set — tracking settings for opens, clicks, bounces
  • Template — reusable email template with variable substitution
  • Receipt Rule — rules for processing incoming emails
  • Suppression List — addresses that bounced or complained
  • Sending Quota — rate limits based on account reputation

Domain Verification

# Verify a domain (creates DKIM records)
aws sesv2 create-email-identity --email-identity example.com
# Get DKIM tokens to add as DNS CNAME records
aws sesv2 get-email-identity --email-identity example.com \
  --query 'DkimAttributes.Tokens'
# Verify a single email address (for testing)
aws sesv2 create-email-identity --email-identity test@example.com
# List verified identities
aws sesv2 list-email-identities --query 'EmailIdentities[].IdentityName'

Sending Email

# Send a simple email
aws sesv2 send-email \
  --from-email-address "noreply@example.com" \
  --destination '{"ToAddresses":["user@example.com"]}' \
  --content '{
    "Simple": {
      "Subject": {"Data": "Order Confirmation #12345"},
      "Body": {
        "Html": {"Data": "<h1>Thank you!</h1><p>Your order has been confirmed.</p>"},
        "Text": {"Data": "Thank you! Your order has been confirmed."}
      }
    }
  }' \
  --configuration-set-name prod-tracking
# Send email with boto3
import boto3

ses = boto3.client('sesv2')

ses.send_email(
    FromEmailAddress='noreply@example.com',
    Destination={
        'ToAddresses': ['user@example.com'],
        'BccAddresses': ['archive@example.com']
    },
    Content={
        'Simple': {
            'Subject': {'Data': 'Your Invoice'},
            'Body': {
                'Html': {'Data': '<h1>Invoice #INV-001</h1><p>Amount: $99.99</p>'},
                'Text': {'Data': 'Invoice #INV-001\nAmount: $99.99'}
            }
        }
    },
    ConfigurationSetName='prod-tracking'
)

Email Templates

# Create a template
aws sesv2 create-email-template \
  --template-name order-confirmation \
  --template-content '{
    "Subject": "Order Confirmation #{{orderNumber}}",
    "Html": "<h1>Hi {{customerName}},</h1><p>Your order #{{orderNumber}} for {{itemName}} has been confirmed.</p><p>Total: ${{total}}</p>",
    "Text": "Hi {{customerName}},\nYour order #{{orderNumber}} for {{itemName}} has been confirmed.\nTotal: ${{total}}"
  }'
# Send using a template
aws sesv2 send-email \
  --from-email-address "orders@example.com" \
  --destination '{"ToAddresses":["user@example.com"]}' \
  --content '{
    "Template": {
      "TemplateName": "order-confirmation",
      "TemplateData": "{\"orderNumber\":\"12345\",\"customerName\":\"Alice\",\"itemName\":\"Widget Pro\",\"total\":\"99.99\"}"
    }
  }'
# Bulk templated sending with boto3
import boto3

ses = boto3.client('sesv2')

ses.send_bulk_email(
    FromEmailAddress='marketing@example.com',
    DefaultContent={
        'Template': {
            'TemplateName': 'weekly-newsletter',
            'TemplateData': '{"week":"Jan 15"}'
        }
    },
    BulkEmailEntries=[
        {
            'Destination': {'ToAddresses': ['alice@example.com']},
            'ReplacementEmailContent': {
                'ReplacementTemplate': {
                    'ReplacementTemplateData': '{"name":"Alice","recommendations":"Widget A, Widget B"}'
                }
            }
        },
        {
            'Destination': {'ToAddresses': ['bob@example.com']},
            'ReplacementEmailContent': {
                'ReplacementTemplate': {
                    'ReplacementTemplateData': '{"name":"Bob","recommendations":"Gadget X, Gadget Y"}'
                }
            }
        }
    ],
    ConfigurationSetName='marketing-tracking'
)

Bounce and Complaint Handling

# Create a configuration set with event destinations
aws sesv2 create-configuration-set --configuration-set-name prod-tracking

# Add SNS destination for bounces and complaints
aws sesv2 create-configuration-set-event-destination \
  --configuration-set-name prod-tracking \
  --event-destination-name bounce-handler \
  --event-destination '{
    "Enabled": true,
    "MatchingEventTypes": ["BOUNCE", "COMPLAINT"],
    "SnsDestination": {
      "TopicArn": "arn:aws:sns:us-east-1:123456789:ses-bounces"
    }
  }'
# Lambda handler for bounce/complaint SNS notifications
import json

def handler(event, context):
    for record in event['Records']:
        message = json.loads(record['Sns']['Message'])
        notification_type = message['notificationType']

        if notification_type == 'Bounce':
            bounce = message['bounce']
            for recipient in bounce['bouncedRecipients']:
                email = recipient['emailAddress']
                bounce_type = bounce['bounceType']  # Permanent or Transient
                if bounce_type == 'Permanent':
                    suppress_email(email)

        elif notification_type == 'Complaint':
            complaint = message['complaint']
            for recipient in complaint['complainedRecipients']:
                unsubscribe_email(recipient['emailAddress'])

Receiving Email

# Create a receipt rule set
aws ses create-receipt-rule-set --rule-set-name inbound-rules
aws ses set-active-receipt-rule-set --rule-set-name inbound-rules
# Create rule to store incoming email in S3 and trigger Lambda
aws ses create-receipt-rule \
  --rule-set-name inbound-rules \
  --rule '{
    "Name": "process-support-emails",
    "Enabled": true,
    "Recipients": ["support@example.com"],
    "Actions": [
      {"S3Action": {"BucketName": "incoming-email", "ObjectKeyPrefix": "support/"}},
      {"LambdaAction": {"FunctionArn": "arn:aws:lambda:us-east-1:123456789:function:process-support-email"}}
    ]
  }'

Monitoring

# Check sending quota and statistics
aws sesv2 get-account --query '{SendQuota:SendQuota,SendingEnabled:SendingEnabled}'
# Get sending statistics
aws ses get-send-statistics --query 'SendDataPoints[-5:]'

Best Practices

  • Always verify domains with DKIM for better deliverability
  • Set up bounce and complaint handling before sending at scale
  • Use configuration sets to track delivery metrics
  • Send from a subdomain (mail.example.com) to protect main domain reputation
  • Include unsubscribe headers in marketing emails (required by law)
  • Warm up new accounts gradually — start with small volumes
  • Use the suppression list API to respect bounces and complaints
  • Test with the SES mailbox simulator before going to production

当前收录版本

1.0.0

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供完整的 AWS SES 邮件服务操作指南,涵盖身份验证、发送、模板、退信处理等核心功能
  • 适用于 DevOps、开发者、运维人员等广泛用户群体,解决实际生产环境需求
触发精准95/100

亮点

  • description 明确描述使用 Amazon SES 发送邮件及相关功能,触发词精准覆盖核心能力
结构规范95/100

待提升项

  • 缺少 When to Use 章节 原报告严重程度:轻微

    文档未明确说明适用场景和使用时机

    改进建议:建议补充 When to Use 章节,说明何时使用此 Skill 以及典型使用场景

亮点

  • 文档结构清晰,分多个功能章节,每部分均有具体命令和代码示例
  • frontmatter 完整,包含名称、描述、许可证、兼容性等信息
执行可靠90/100

亮点

  • 所有命令和代码示例均基于官方 AWS CLI 和 boto3 SDK,参数正确
  • 包含异常处理机制(如退信/投诉 Lambda 处理),覆盖主要使用场景
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。