SES verified identity of type Domain via CDK

1

Hi team!

is there a way to create/validate a domain identity in SES via CDK,

on the CSK documentation, I only found EmailIdentity construct

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses-readme.html#email-identity

should I use a custom construct?

https://github.com/mooyoul/aws-cdk-ses-domain-identity

I want to create an SES verified identity of type Domain via CDK code.

Thank you!

1 回答
1

Hi,

The EmailIdentity construct applies to both email addresses and domains. Assuming you would like to verify a domain identity that has its DNS hosted in Route53, you can leverage the example in the CDK documentation you referenced which results in all the records for that domain being created in Route53:

declare const myHostedZone: route53.IPublicHostedZone;

const identity = new ses.EmailIdentity(stack, 'Identity', {
  identity: ses.Identity.publicHostedZone(myHostedZone),
  mailFromDomain: 'mail.cdk.dev',
});

Email identity : https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ses-readme.html#email-identity

profile pictureAWS
支持工程师
Simba_M
已回答 2 年前
  • How would one do this if you are not creating the Route53 PublicHostedZone in the same stack? (how to update within an existing PublicHostedZone?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则