This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const response = require('cfn-response'); | |
| const AWS = require('aws-sdk'); | |
| const propertiesToParams = (props) => ({ | |
| ConfigurationSetName: props.ConfigSetName, | |
| EventDestination: { | |
| Name: props.ConfigSetEventDestinationName, | |
| Enabled: props.Enabled || true, | |
| MatchingEventTypes: ['send', 'reject', 'bounce', 'complaint', 'delivery', 'open'], | |
| SNSDestination: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var elastic = require('elasticsearch'); | |
| var client = new elastic.Client({ host: 'localhost:9200' }); | |
| var index = 'myindex'; | |
| var type = 'document'; | |
| (function init() { | |
| Promise.resolve() | |
| .then(deleteIndex, handleError) |