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

ses.tf#L14
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]

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

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

serverless.yml#L79
      Type: AWS::SES::ReceiptRuleSet
      Properties:
        RuleSetName: ${self:service}-${self:provider.stage}-wearetopcoder
    SESReceiptRule1:
      Type: AWS::SES::ReceiptRule
      DependsOn: BucketPolicy
ses.yml#L7
    Type: AWS::SES::ReceiptRuleSet
    # Only create if ExistingSesRulesetName is empty
    #Condition: CreateNewSesRuleset
    Properties:
      RuleSetName: DailyIdeaSesReceiverRuleSet-${self:provider.stage}

ses-rule.yml#L3
    Type: AWS::SES::ReceiptRule
    Properties:
      Rule:
        Enabled: true
        Actions:
          - S3Action:
rusuden-aws-stack-01.yml#L19
    Type: AWS::SES::ReceiptRule
    Properties:
      RuleSetName: !Ref defaultSesRuleSet
      Rule:
        Name: !Sub ${appName}-aws-receiptRule-00
        Enabled: True
spam.yml#L1
Type: AWS::SES::ReceiptRule
Properties:
  Rule:
    Name: DropSpam-BounceDMARC
    Enabled: true
    ScanEnabled: true
integ.receipt.expected.json#L4
      "Type": "AWS::SES::ReceiptRuleSet"
    },
    "RuleSetDropSpamRule5809F51B": {
      "Type": "AWS::SES::ReceiptRule",
      "Properties": {
        "Rule": {
integ.receipt.expected.json#L4
      "Type": "AWS::SES::ReceiptRuleSet"
    },
    "RuleSetDropSpamRule5809F51B": {
      "Type": "AWS::SES::ReceiptRule",
      "Properties": {
        "Rule": {
integ.receipt.expected.json#L4
      "Type": "AWS::SES::ReceiptRuleSet"
    },
    "RuleSetDropSpamRule5809F51B": {
      "Type": "AWS::SES::ReceiptRule",
      "Properties": {
        "Rule": {
integ.receipt.expected.json#L4
      "Type": "AWS::SES::ReceiptRuleSet"
    },
    "RuleSetDropSpamRule5809F51B": {
      "Type": "AWS::SES::ReceiptRule",
      "Properties": {
        "Rule": {
integ.receipt.expected.json#L4
      "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.