Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.
/ cwevents-playground Public archive

A simple architecture for testing AWS CloudWatch event patterns in situ using AWS CloudFormation

Notifications You must be signed in to change notification settings

mapbox/cwevents-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cwevents-playground

A simple architecture for testing AWS CloudWatch event patterns in situ using AWS CloudFormation. The CloudFormation template is comprised of the following:

  • NotificationEmail Parameter Email address to send AWS CloudWatch event details to
  • NotificationTopic Resource AWS Simple Notification Service (SNS) topic
  • NotificationEventRule Resource The AWS CloudWatch event rule to test

Install

$ git clone [email protected]:mapbox/cwevents-playground.git
$ cd cwevents-playground
$ npm install

Configure the CloudWatch event pattern

By default, the CloudWatch event pattern in the CloudFormation is configured to poll for EC2 instances that have transitioned into a stopped state:

EventPattern: {
  source: ['aws.ec2'],
  'detail-type': ['EC2 Instance State-change Notification'],
  detail: { state: ['stopped'] }
}

Update the default event pattern to the pattern you would like to test.

Create your stack

You can build your template and print the result in your console:

$ npm run build

Or, you can create a stack with the cfn-config CLI:

$ npm install -g cfn-config
$ cfn-config create <environment> cloudformation/cwevents-playground.template.js [options]

About

A simple architecture for testing AWS CloudWatch event patterns in situ using AWS CloudFormation

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published