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
-
after
optional - string -
arn
optional computed - string -
enabled
optional - bool -
id
optional computed - string -
name
required - string -
recipients
optional - set of string -
rule_set_name
required - string -
scan_enabled
optional - bool -
tls_policy
optional computed - string -
add_header_action
set block-
header_name
required - string -
header_value
required - string -
position
required - number
-
-
bounce_action
set block-
message
required - string -
position
required - number -
sender
required - string -
smtp_reply_code
required - string -
status_code
optional - string -
topic_arn
optional - string
-
-
lambda_action
set block-
function_arn
required - string -
invocation_type
optional computed - string -
position
required - number -
topic_arn
optional - string
-
-
s3_action
set block-
bucket_name
required - string -
kms_key_arn
optional - string -
object_key_prefix
optional - string -
position
required - number -
topic_arn
optional - string
-
-
sns_action
set block -
stop_action
set block -
workmail_action
set block-
organization_arn
required - string -
position
required - number -
topic_arn
optional - 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.