aws-cdk
aws-cdk copied to clipboard
SES: EventDestination does not have eventBridge as a destination option
Describe the bug
I'm trying to add the default event bus as the event destination for my mailing events.
My use case is that I want to save delivery information about the emails being sent from SES for compliance reasons. Am able to achieve this if I setup the configuationSet and event destination via the AWS CLI, however I can't see the option to add eventBridge as a destination in cdk.
Expected Behavior
Be able to set EventBridge as a event destination
Current Behavior
not able to set EventBridge as a event destination
Reproduction Steps
appState.sesConfigurationSet = new ses.CfnConfigurationSet(appState.stack, `${PREFIX}ConfigurationSet`, {
name: `${PREFIX}ConfigurationSet`,
reputationOptions: {
reputationMetricsEnabled: true,
},
});
appState.sesEventDestination = new ses.CfnConfigurationSetEventDestination(appState.stack, `${PREFIX}EventDestination`, {
configurationSetName: appState.sesConfigurationSet.name || "",
eventDestination: {
matchingEventTypes: ['delivery'],
name: `${PREFIX}EventDestination`,
enabled: true,
eventBridgeDestination: {
arn: appState.defaultEventBus.eventBusArn || "",
},
// set event bridge as destination with name AWS_SES_SEND_EMAIL and rules for bounce, complaint and delivery
},
});
Possible Solution
Additional Information/Context
No response
CDK CLI Version
1.199.0
Framework Version
No response
Node.js Version
18
OS
Mac OS
Language
TypeScript
Language Version
3.8
Other information
No response
Findings:
- Based on CfnConfigurationSetEventDestination CDK documentation, there is no property for EventBridge as destination option.
- However, AWS::SES::ConfigurationSetEventDestination EventDestination specifies EventBridgeDestination as one of the options.
- CloudFormation spec here also has
EventBridgeDestinationforAWS::SES::ConfigurationSetEventDestination.EventDestination.
CFN spec was updated 2 days ago in commit https://github.com/cdklabs/awscdk-service-spec/commit/65cd752f0df1c9f5b9d7d661c0c85adc54d6fbe8. It might take few days for changes to flow to CDK.
@anishsundarjee You might want to use CDK v2 since v1 is deprecated.
eventBridgeDestination is now available in latest CDK Lib version.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.