Skip to content

ses: allow ConfigurationSet to disable suppression list #32149

@Tietew

Description

@Tietew

Describe the feature

ConfigurationSet have a option to override suppression list settings.
AWS console allows us to disable suppression list:
image

But ConfigurationSet L2 construct only allows to specify one or more supression reasons.
CloudFormation supports to disable suppression list by specifying SuppressionOptions.SuppressionReasons resource property to [] (empty array).

Use Case

Disabling suppression list allows us to send an e-mail to already suppressed (in account-level suppression list) destinations.
This behavior is useful to send verification code to verify whether an e-mail address is reachable.

Proposed Solution

Introduce disableSuppressionList property.

Usage:

// disable suppression list
new ses.ConfigurationSet(this, 'ConfigurationSet', {
  disableSuppressionList: true,
});

// default - account-level suppression settings will be used
new ses.ConfigurationSet(this, 'ConfigurationSet', {
  disableSuppressionList: false,
});

// error - suppressionReasons must be absent
new ses.ConfigurationSet(this, 'ConfigurationSet', {
  disableSuppressionList: true,
  suppressionReasons: ses.SuppressionReasons.BOUNCE,
});

// redundant but allowed - override suppression reasons
new ses.ConfigurationSet(this, 'ConfigurationSet', {
  disableSuppressionList: false,
  suppressionReasons: ses.SuppressionReasons.BOUNCE,
});

Other Information

AWS Documentation: Using configuration set-level suppression to override your account-level suppression list
https://docs.aws.amazon.com/ses/latest/dg/sending-email-suppression-list-config-level.html

Escape hatch available:

const configurationSet = new ses.ConfigurationSet(this, 'ConfigurationSet');
(configurationSet.node.defaultChild as ses.CfnConfigurationSet).addPropertyOverride('SuppressionOptions.SuppressedReasons', []);

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.166.0

Environment details (OS name and version, etc.)

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-sesRelated to Amazon Simple Email Serviceeffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions