AWS是否支持CloudFormation中的SES?

Ale*_*ira 7 amazon-web-services amazon-ses aws-cloudformation

我正在尝试使用CloudFormation来弄清楚如何在AWS中自动创建多个云资源.

现在我需要包括创建SES(简单电子邮件服务)域,但找不到文档,但我已经检查过:

AWS是否支持CloudFormation中的SES?

med*_*nds 11

CloudFormation 提供了多种内置的Amazon SES 资源类型,但截至 2020 年仍然缺少许多人需要的资源类型电子邮件验证

幸运的是,CloudFormation 能够定义您自己的自定义资源类型。我已经建立Custom::SES_DomainCustom::SES_EmailIdentity资源,旨在与其他CloudFormation资源,发挥好。在此处获取它们:https : //github.com/medmunds/aws-cfn-ses-domain

将自定义拉CfnSESResources入模板后,您可以像这样验证 SES 域:

Resources:
  # Provision a domain with Amazon SES:
  MySESDomain:
    Type: Custom::SES_Domain
    Properties:
      ServiceToken: !GetAtt CfnSESResources.Outputs.CustomDomainIdentityArn
      Domain: "example.com"
      EnableSend: true
      EnableReceive: false

  # Then add all required DNS records for SES verification and usage:
  MyRoute53RecordsForSES:
    Type: AWS::Route53::RecordSetGroup
    Properties:
      HostedZoneName: "example.com."
      RecordSets: !GetAtt MySESDomain.Route53RecordSets
Run Code Online (Sandbox Code Playgroud)

完整说明在存储库中。Custom::SES_Domain具有属性用于控制几种常见SES域的选择,并公开属性饲料到您CloudFormation DNS资源:一个标准的AWS::Route53::RecordSetGroup如上所示的资源,或者通过区域文件条目其他(外部)DNS提供商。


jar*_*man 7

不幸的是,这目前还不支持,但谁知道Re:Invent 2017即将来临,,,

在AWS开发者论坛上提问

可以通过创建自定义函数,一些关于SES和cloudformation的博客.


小智 5

CloudFormation 现在提供原生AWS::SES::EmailIdentity资源。(自2022年7月30日起)

以下是自动 Route53 DEKIM 设置/验证的示例:

EmailIdentity:
    Type: AWS::SES::EmailIdentity
    Properties: 
        EmailIdentity: {your.domain.com}

Route53DEKIM:
    Type: AWS::Route53::RecordSetGroup
    Properties:
        HostedZoneId: {ZoneId}
        RecordSets:
            -   Name: !GetAtt EmailIdentity.DkimDNSTokenName1
                Type: CNAME
                TTL: '3600'
                ResourceRecords:
                    - !GetAtt EmailIdentity.DkimDNSTokenValue1
            -   Name: !GetAtt EmailIdentity.DkimDNSTokenName2
                Type: CNAME
                TTL: '3600'
                ResourceRecords:
                    - !GetAtt EmailIdentity.DkimDNSTokenValue2
            -   Name: !GetAtt EmailIdentity.DkimDNSTokenName3
                Type: CNAME
                TTL: '3600'
                ResourceRecords:
                    - !GetAtt EmailIdentity.DkimDNSTokenValue3
Run Code Online (Sandbox Code Playgroud)

{your.domain.com}并且{ZoneId}必须进行调整。