-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SES stack and send emails via aws sdk
- Loading branch information
1 parent
6fec176
commit 899d2da
Showing
7 changed files
with
151 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Stack, StackProps } from 'aws-cdk-lib'; | ||
import { Construct } from 'constructs'; | ||
import * as ses from 'aws-cdk-lib/aws-ses' | ||
import { HostedZone } from 'aws-cdk-lib/aws-route53'; | ||
import * as cdk from 'aws-cdk-lib'; | ||
import { EmailIdentity } from "aws-cdk-lib/aws-ses"; | ||
|
||
interface sesProps extends StackProps { | ||
hostedZone: HostedZone | ||
} | ||
|
||
export class SesStack extends Stack { | ||
public emailIdentity: EmailIdentity; | ||
|
||
constructor(scope: Construct, id: string, props: sesProps) { | ||
super(scope, id, props); | ||
this.emailIdentity = new ses.EmailIdentity(this, 'EmailIdentity', { | ||
identity: ses.Identity.publicHostedZone(props.hostedZone) | ||
}) | ||
|
||
new cdk.CfnOutput(this, 'EmailIdentityArn', { | ||
value: this.emailIdentity.emailIdentityArn, | ||
description: 'The ARN of the SES Email Identity', | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters