-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the feature
ConfigurationSet have a option to override suppression list settings.
AWS console allows us to disable suppression list:
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