aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

SES: EventDestination does not have eventBridge as a destination option

Open anishsundarjee opened this issue 1 year ago • 1 comments

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

anishsundarjee avatar Jun 26 '24 07:06 anishsundarjee

Findings:

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.

ashishdhingra avatar Jun 26 '24 17:06 ashishdhingra

eventBridgeDestination is now available in latest CDK Lib version.

ashishdhingra avatar Jul 15 '24 16:07 ashishdhingra

⚠️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.

github-actions[bot] avatar Jul 15 '24 16:07 github-actions[bot]

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.

aws-cdk-automation avatar Jul 25 '24 17:07 aws-cdk-automation