aws-cdk-lib.aws_ses_actions.S3Props

interface S3Props

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

Construction properties for a S3 action.

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,
        }),
      ],
    },
  ],
});

Properties

NameTypeDescription
bucketIBucketThe S3 bucket that incoming email will be saved to.
kmsKey?IKeyThe master key that SES should use to encrypt your emails before saving them to the S3 bucket.
objectKeyPrefix?stringThe key prefix of the S3 bucket.
topic?ITopicThe SNS topic to notify when the S3 action is taken.

bucket

Type: IBucket

The S3 bucket that incoming email will be saved to.


kmsKey?

Type: IKey (optional, default: no encryption)

The master key that SES should use to encrypt your emails before saving them to the S3 bucket.


objectKeyPrefix?

Type: string (optional, default: no prefix)

The key prefix of the S3 bucket.


topic?

Type: ITopic (optional, default: no notification)

The SNS topic to notify when the S3 action is taken.