Skip to content
v2.274.0

S3Props Struct ​

Construction properties for a S3 action.

Example ​

ts
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 ​

bucketIBucketbucketIBucketbucketIBucketBucketIBucketBucketIBucketrequired#
The S3 bucket that incoming email will be saved to.
kmsKeyoptionalIKeykms_keyoptionalIKeykmsKeyoptionalIKeyKmsKeyoptionalIKeyKmsKeyoptionalIKey#
The master key that SES should use to encrypt your emails before saving them to the S3 bucket.

Default: no encryption

objectKeyPrefixoptionalstringobject_key_prefixoptionalstrobjectKeyPrefixoptionalStringObjectKeyPrefixoptionalstringObjectKeyPrefixoptional*string#
The key prefix of the S3 bucket.

Default: no prefix

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

Default: no notification