AWS Amazon SES Receipt Rule
This page shows how to write Terraform and CloudFormation for Amazon SES Receipt Rule and write them securely.
aws_ses_receipt_rule (Terraform)
The Receipt Rule in Amazon SES can be configured in Terraform with the resource name aws_ses_receipt_rule. The following sections describe 1 example of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_ses_receipt_rule" "feedback" {
count = var.feedback_email == "" ? 0 : 1
name = "sw-feedback"
rule_set_name = aws_ses_receipt_rule_set.sw_check_in.rule_set_name
recipients = [var.feedback_email]
Parameters
-
afteroptional - string -
arnoptional computed - string -
enabledoptional - bool -
idoptional computed - string -
namerequired - string -
recipientsoptional - set of string -
rule_set_namerequired - string -
scan_enabledoptional - bool -
tls_policyoptional computed - string -
add_header_actionset block-
header_namerequired - string -
header_valuerequired - string -
positionrequired - number
-
-
bounce_actionset block-
messagerequired - string -
positionrequired - number -
senderrequired - string -
smtp_reply_coderequired - string -
status_codeoptional - string -
topic_arnoptional - string
-
-
lambda_actionset block-
function_arnrequired - string -
invocation_typeoptional computed - string -
positionrequired - number -
topic_arnoptional - string
-
-
s3_actionset block-
bucket_namerequired - string -
kms_key_arnoptional - string -
object_key_prefixoptional - string -
positionrequired - number -
topic_arnoptional - string
-
-
sns_actionset block -
stop_actionset block -
workmail_actionset block-
organization_arnrequired - string -
positionrequired - number -
topic_arnoptional - string
-
Explanation in Terraform Registry
Provides an SES receipt rule resource
AWS::SES::ReceiptRule (CloudFormation)
The ReceiptRule in SES can be configured in CloudFormation with the resource name AWS::SES::ReceiptRule. The following sections describe 10 examples of how to use the resource and its parameters.
Example Usage from GitHub
Type: AWS::SES::ReceiptRuleSet
Properties:
RuleSetName: ${self:service}-${self:provider.stage}-wearetopcoder
SESReceiptRule1:
Type: AWS::SES::ReceiptRule
DependsOn: BucketPolicy
Type: AWS::SES::ReceiptRuleSet
# Only create if ExistingSesRulesetName is empty
#Condition: CreateNewSesRuleset
Properties:
RuleSetName: DailyIdeaSesReceiverRuleSet-${self:provider.stage}
Type: AWS::SES::ReceiptRule
Properties:
Rule:
Enabled: true
Actions:
- S3Action:
Type: AWS::SES::ReceiptRule
Properties:
RuleSetName: !Ref defaultSesRuleSet
Rule:
Name: !Sub ${appName}-aws-receiptRule-00
Enabled: True
Type: AWS::SES::ReceiptRule
Properties:
Rule:
Name: DropSpam-BounceDMARC
Enabled: true
ScanEnabled: true
"Type": "AWS::SES::ReceiptRuleSet"
},
"RuleSetDropSpamRule5809F51B": {
"Type": "AWS::SES::ReceiptRule",
"Properties": {
"Rule": {
"Type": "AWS::SES::ReceiptRuleSet"
},
"RuleSetDropSpamRule5809F51B": {
"Type": "AWS::SES::ReceiptRule",
"Properties": {
"Rule": {
"Type": "AWS::SES::ReceiptRuleSet"
},
"RuleSetDropSpamRule5809F51B": {
"Type": "AWS::SES::ReceiptRule",
"Properties": {
"Rule": {
"Type": "AWS::SES::ReceiptRuleSet"
},
"RuleSetDropSpamRule5809F51B": {
"Type": "AWS::SES::ReceiptRule",
"Properties": {
"Rule": {
"Type": "AWS::SES::ReceiptRuleSet"
},
"RuleSetDropSpamRule5809F51B": {
"Type": "AWS::SES::ReceiptRule",
"Properties": {
"Rule": {
Parameters
After
The name of an existing rule after which the new rule is placed. If this parameter is null, the new rule is inserted at the beginning of the rule list.
Required: No
Type: String
Update requires: No interruption
Rule
A data structure that contains the specified rule's name, actions, recipients, domains, enabled status, scan status, and TLS policy.
Required: Yes
Type: Rule
Update requires: No interruption
RuleSetName
The name of the rule set where the receipt rule is added.
Required: Yes
Type: String
Update requires: Replacement
Explanation in CloudFormation Registry
Specifies a receipt rule.
Frequently asked questions
What is AWS Amazon SES Receipt Rule?
AWS Amazon SES Receipt Rule is a resource for Amazon SES of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS Amazon SES Receipt Rule?
For Terraform, the DavidWittman/serverless-southwest-check-in source code example is useful. See the Terraform Example section for further details.
For CloudFormation, the topcoder-platform/ses-forwarder, dailyidea/dailyidea.com and ejsexton82/serverless-ses-forwarder source code examples are useful. See the CloudFormation Example section for further details.