See: Description
| Interface | Description |
|---|---|
| AddHeaderActionConfig |
AddHeaderAction configuration.
|
| AllowListReceiptFilterProps |
Construction properties for am AllowListReceiptFilter.
|
| BounceActionConfig |
BoundAction configuration.
|
| ByoDkimOptions |
Options for BYO DKIM.
|
| CfnConfigurationSet.DeliveryOptionsProperty |
Example:
|
| CfnConfigurationSet.ReputationOptionsProperty |
Example:
|
| CfnConfigurationSet.SendingOptionsProperty |
Example:
|
| CfnConfigurationSet.SuppressionOptionsProperty |
Example:
|
| CfnConfigurationSet.TrackingOptionsProperty |
Example:
|
| CfnConfigurationSetEventDestination.CloudWatchDestinationProperty |
Contains information associated with an Amazon CloudWatch event destination to which email sending events are published.
|
| CfnConfigurationSetEventDestination.DimensionConfigurationProperty |
Contains the dimension configuration to use when you publish email sending events to Amazon CloudWatch.
|
| CfnConfigurationSetEventDestination.EventDestinationProperty |
Contains information about an event destination.
|
| CfnConfigurationSetEventDestination.KinesisFirehoseDestinationProperty |
Contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.
|
| CfnConfigurationSetEventDestination.SnsDestinationProperty |
Example:
|
| CfnConfigurationSetEventDestinationProps |
Properties for defining a `CfnConfigurationSetEventDestination`.
|
| CfnConfigurationSetProps |
Properties for defining a `CfnConfigurationSet`.
|
| CfnContactList.TopicProperty |
An interest group, theme, or label within a list.
|
| CfnContactListProps |
Properties for defining a `CfnContactList`.
|
| CfnDedicatedIpPoolProps |
Properties for defining a `CfnDedicatedIpPool`.
|
| CfnEmailIdentity.ConfigurationSetAttributesProperty |
Example:
|
| CfnEmailIdentity.DkimAttributesProperty |
Example:
|
| CfnEmailIdentity.DkimSigningAttributesProperty |
Example:
|
| CfnEmailIdentity.FeedbackAttributesProperty |
Example:
|
| CfnEmailIdentity.MailFromAttributesProperty |
Example:
|
| CfnEmailIdentityProps |
Properties for defining a `CfnEmailIdentity`.
|
| CfnReceiptFilter.FilterProperty |
Specifies an IP address filter.
|
| CfnReceiptFilter.IpFilterProperty |
A receipt IP address filter enables you to specify whether to accept or reject mail originating from an IP address or range of IP addresses.
|
| CfnReceiptFilterProps |
Properties for defining a `CfnReceiptFilter`.
|
| CfnReceiptRule.ActionProperty |
An action that Amazon SES can take when it receives an email on behalf of one or more email addresses or domains that you own.
|
| CfnReceiptRule.AddHeaderActionProperty |
When included in a receipt rule, this action adds a header to the received email.
|
| CfnReceiptRule.BounceActionProperty |
When included in a receipt rule, this action rejects the received email by returning a bounce response to the sender and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
|
| CfnReceiptRule.LambdaActionProperty |
When included in a receipt rule, this action calls an AWS Lambda function and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
|
| CfnReceiptRule.RuleProperty |
Receipt rules enable you to specify which actions Amazon SES should take when it receives mail on behalf of one or more email addresses or domains that you own.
|
| CfnReceiptRule.S3ActionProperty |
When included in a receipt rule, this action saves the received message to an Amazon Simple Storage Service (Amazon S3) bucket and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
|
| CfnReceiptRule.SNSActionProperty |
When included in a receipt rule, this action publishes a notification to Amazon Simple Notification Service (Amazon SNS).
|
| CfnReceiptRule.StopActionProperty |
When included in a receipt rule, this action terminates the evaluation of the receipt rule set and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
|
| CfnReceiptRule.WorkmailActionProperty |
When included in a receipt rule, this action calls Amazon WorkMail and, optionally, publishes a notification to Amazon Simple Notification Service (Amazon SNS).
|
| CfnReceiptRuleProps |
Properties for defining a `CfnReceiptRule`.
|
| CfnReceiptRuleSetProps |
Properties for defining a `CfnReceiptRuleSet`.
|
| CfnTemplate.TemplateProperty |
The content of the email, composed of a subject line and either an HTML part or a text-only part.
|
| CfnTemplateProps |
Properties for defining a `CfnTemplate`.
|
| ConfigurationSetProps |
Properties for a configuration set.
|
| DedicatedIpPoolProps |
Properties for a dedicated IP pool.
|
| DkimIdentityConfig |
Configuration for DKIM identity.
|
| DkimRecord |
A DKIM record.
|
| DropSpamReceiptRuleProps |
Example:
|
| EmailIdentityProps |
Properties for an email identity.
|
| IConfigurationSet |
A configuration set.
|
| IConfigurationSet.Jsii$Default |
Internal default implementation for
IConfigurationSet. |
| IDedicatedIpPool |
A dedicated IP pool.
|
| IDedicatedIpPool.Jsii$Default |
Internal default implementation for
IDedicatedIpPool. |
| IEmailIdentity |
An email identity.
|
| IEmailIdentity.Jsii$Default |
Internal default implementation for
IEmailIdentity. |
| IReceiptRule |
A receipt rule.
|
| IReceiptRule.Jsii$Default |
Internal default implementation for
IReceiptRule. |
| IReceiptRuleAction |
An abstract action for a receipt rule.
|
| IReceiptRuleAction.Jsii$Default |
Internal default implementation for
IReceiptRuleAction. |
| IReceiptRuleSet |
A receipt rule set.
|
| IReceiptRuleSet.Jsii$Default |
Internal default implementation for
IReceiptRuleSet. |
| LambdaActionConfig |
LambdaAction configuration.
|
| ReceiptFilterProps |
Construction properties for a ReceiptFilter.
|
| ReceiptRuleActionConfig |
Properties for a receipt rule action.
|
| ReceiptRuleOptions |
Options to add a receipt rule to a receipt rule set.
|
| ReceiptRuleProps |
Construction properties for a ReceiptRule.
|
| ReceiptRuleSetProps |
Construction properties for a ReceiptRuleSet.
|
| S3ActionConfig |
S3Action configuration.
|
| SNSActionConfig |
SNSAction configuration.
|
| StopActionConfig |
StopAction configuration.
|
| WorkmailActionConfig |
WorkmailAction configuration.
|
| Enum | Description |
|---|---|
| ConfigurationSetTlsPolicy |
TLS policy for a configuration set.
|
| EasyDkimSigningKeyLength |
The signing key length for Easy DKIM.
|
| MailFromBehaviorOnMxFailure |
The action to take if the required MX record for the MAIL FROM domain isn't found.
|
| ReceiptFilterPolicy |
The policy for the receipt filter.
|
| SuppressionReasons |
Reasons for which recipient email addresses should be automatically added to your account's suppression list.
|
| TlsPolicy |
The type of TLS policy for a receipt rule.
|
This module is part of the AWS Cloud Development Kit project.
Create a receipt rule set with rules and actions (actions can be found in the
@aws-cdk/aws-ses-actions package):
import software.amazon.awscdk.services.s3.*;
import software.amazon.awscdk.services.ses.actions.*;
Bucket bucket = new Bucket(this, "Bucket");
Topic topic = new Topic(this, "Topic");
ReceiptRuleSet.Builder.create(this, "RuleSet")
.rules(List.of(ReceiptRuleOptions.builder()
.recipients(List.of("hello@aws.com"))
.actions(List.of(
AddHeader.Builder.create()
.name("X-Special-Header")
.value("aws")
.build(),
S3.Builder.create()
.bucket(bucket)
.objectKeyPrefix("emails/")
.topic(topic)
.build()))
.build(), ReceiptRuleOptions.builder()
.recipients(List.of("aws.com"))
.actions(List.of(
Sns.Builder.create()
.topic(topic)
.build()))
.build()))
.build();
Alternatively, rules can be added to a rule set:
ReceiptRuleSet ruleSet = new ReceiptRuleSet(this, "RuleSet");
ReceiptRule awsRule = ruleSet.addRule("Aws", ReceiptRuleOptions.builder()
.recipients(List.of("aws.com"))
.build());
And actions to rules:
import software.amazon.awscdk.services.ses.actions.*;
ReceiptRule awsRule;
Topic topic;
awsRule.addAction(Sns.Builder.create()
.topic(topic)
.build());
When using addRule, the new rule is added after the last added rule unless after is specified.
A rule to drop spam can be added by setting dropSpam to true:
ReceiptRuleSet.Builder.create(this, "RuleSet")
.dropSpam(true)
.build();
This will add a rule at the top of the rule set with a Lambda action that stops processing messages that have at least one spam indicator. See Lambda Function Examples.
Create a receipt filter:
ReceiptFilter.Builder.create(this, "Filter")
.ip("1.2.3.4/16")
.build();
An allow list filter is also available:
AllowListReceiptFilter.Builder.create(this, "AllowList")
.ips(List.of("10.0.0.0/16", "1.2.3.4/16"))
.build();
This will first create a block all filter and then create allow filters for the listed ip addresses.
When you create a new Amazon SES account, your emails are sent from IP addresses that are shared with other Amazon SES users. For an additional monthly charge, you can lease dedicated IP addresses that are reserved for your exclusive use.
Use the DedicatedIpPool construct to create a pool of dedicated IP addresses:
new DedicatedIpPool(this, "Pool");
The pool can then be used in a configuration set.
Configuration sets are groups of rules that you can apply to your verified identities. A verified identity is a domain, subdomain, or email address you use to send email through Amazon SES. When you apply a configuration set to an email, all of the rules in that configuration set are applied to the email.
Use the ConfigurationSet construct to create a configuration set:
IDedicatedIpPool myPool;
ConfigurationSet.Builder.create(this, "ConfigurationSet")
.customTrackingRedirectDomain("track.cdk.dev")
.suppressionReasons(SuppressionReasons.COMPLAINTS_ONLY)
.tlsPolicy(ConfigurationSetTlsPolicy.REQUIRE)
.dedicatedIpPool(myPool)
.build();
In Amazon SES, a verified identity is a domain or email address that you use to send or receive email. Before you
can send an email using Amazon SES, you must create and verify each identity that you're going to use as a From,
Source, Sender, or Return-Path address. Verifying an identity with Amazon SES confirms that you own it and
helps prevent unauthorized use.
To verify an identity for a hosted zone, you create an EmailIdentity:
// Example automatically generated from non-compiling source. May contain errors.
IPublicHostedZone myHostedZone;
EmailIdentity identity = EmailIdentity.Builder.create(stack, "Identity")
.identity(Identity.publicHostedZone(myHostedZone))
.mailFromDomain("mail.cdk.dev")
.build();
By default, Easy DKIM with a 2048-bit DKIM key is used.
You can instead configure DKIM authentication by using your own public-private key pair. This process is known as Bring Your Own DKIM (BYODKIM):
// Example automatically generated from non-compiling source. May contain errors.
IPublicHostedZone myHostedZone;
EmailIdentity.Builder.create(stack, "Identity")
.identity(Identity.publicHostedZone(myHostedZone))
.dkimIdentity(DkimIdentity.byoDkim(Map.of(
"privateKey", SecretValue.secretsManager("dkim-private-key"),
"publicKey", "...base64-encoded-public-key...",
"selector", "selector")))
.build();
When using publicHostedZone() for the identity, all necessary Amazon Route 53 records are created automatically:
When working with domain(), records must be created manually:
// Example automatically generated from non-compiling source. May contain errors.
EmailIdentity identity = EmailIdentity.Builder.create(stack, "Identity")
.identity(Identity.domain("cdk.dev"))
.build();
for (Object record : identity.getDkimRecords()) {
}
Copyright © 2022. All rights reserved.