npm.io
1.3.0 • Published 5 years ago

@justin8-cdk/alarms-stack

Licence
MIT
Version
1.3.0
Deps
2
Size
4 kB
Vulns
0
Weekly
0

CDK Alarms Stack

This is a very short and simple wrapper to create an SNS topic and subscribe a list of email addresses to the topic. It is just a shorter and more readable form to insert in to a CDK app for use with CloudWatch alarms

Usage

  const app = new cdk.App();
  const stack = new alarmsStack(app, "TestStack", {
      alarmEmails: ["me@example.com", "someoneElse@foo.xyz"],
      alarmsTopicName: "someTopic"
  });

The above will generate:

  • An SNS topic named "someTopic"
  • 2 email subscriptions, one for each of the given emails
  • The alarm topic is accessible at stack.alarmsTopic