aws-cdk-lib.aws_ses_actions.S3

class S3

LanguageType name
.NETAmazon.CDK.AWS.SES.Actions.S3
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awssesactions#S3
Javasoftware.amazon.awscdk.services.ses.actions.S3
Pythonaws_cdk.aws_ses_actions.S3
TypeScript (source)aws-cdk-lib » aws_ses_actions » S3

Implements IReceiptRuleAction

Saves the received message to an Amazon S3 bucket and, optionally, publishes a notification to Amazon SNS.

Example

import * as s3 from 'aws-cdk-lib/aws-s3';
import * as actions from 'aws-cdk-lib/aws-ses-actions';

const bucket = new s3.Bucket(this, 'Bucket');
const topic = new sns.Topic(this, 'Topic');

new ses.ReceiptRuleSet(this, 'RuleSet', {
  rules: [
    {
      recipients: ['hello@aws.com'],
      actions: [
        new actions.AddHeader({
          name: 'X-Special-Header',
          value: 'aws',
        }),
        new actions.S3({
          bucket,
          objectKeyPrefix: 'emails/',
          topic,
        }),
      ],
    },
    {
      recipients: ['aws.com'],
      actions: [
        new actions.Sns({
          topic,
        }),
      ],
    },
  ],
});

Initializer

new S3(props: S3Props)

Parameters

  • props S3Props

Methods

NameDescription
bind(rule)Returns the receipt rule action specification.

bind(rule)

public bind(rule: IReceiptRule): ReceiptRuleActionConfig

Parameters

  • rule IReceiptRule

Returns

  • ReceiptRuleActionConfig

Returns the receipt rule action specification.