Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SES monitoring support to Email resource #402

Open
colemahatmccreary opened this issue May 12, 2024 · 0 comments
Open

Add SES monitoring support to Email resource #402

colemahatmccreary opened this issue May 12, 2024 · 0 comments
Assignees

Comments

@colemahatmccreary
Copy link

colemahatmccreary commented May 12, 2024

as first mentioned in this discord exchange with Frank, it would be great if the email resource supported monitoring SES events via an SNS topic, as described in the AWS docs.

batteries-included config for automatically setting up the topic along with any lambda/queue/email/other subscribers would be major.

happy to keep bouncing ideas (and it sounded like @san4d had more specifics in mind), but my idea for the API would be something along these lines:

new sst.aws.Email('MyEmail', {
   sender: 'sender@foo.bar',
   monitoring: {
      email: [
         'email_admin@bar.org'
         'another_email_admin@bar.org'
      ],
      lambda: [
         new sst.aws.Function('EmailTopicLambdaSubscriber', {...})
      ],
      queue: [...],
      sms: [...],
      ...
   }
})

it'd probably make sense for each subscriber to specify which events it receives, with something like:

...
monitoring: {
   email: [
      {
         events: [...],
         recipient: 'email_monitor@bar.org'
      }
   ],
   lambda: [
      {
         events: [...],
         resource: new sst.aws.Function('EmailTopicLambdaSubscriber1', {...})
      },
      {
         events: [...],
         resource: new sst.aws.Function('EmailTopicLambdaSubscriber2', {...})
      }
   ]
}
   ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants