How to use the CloudWatchEvents function from aws-sdk
Find comprehensive JavaScript aws-sdk.CloudWatchEvents code examples handpicked from public code repositorys.
GitHub: orta/claudia
11 12 13 14 15 16 17 18 19 20
logs = new aws.CloudWatchLogs({ region: awsRegion }), apiGatewayPromise = retriableWrap(new aws.APIGateway({ region: awsRegion })), s3 = new aws.S3(), iot = new aws.Iot({ region: awsRegion }), sns = new aws.SNS({ region: awsRegion }), events = new aws.CloudWatchEvents({ region: awsRegion }), cognitoIdentityServiceProvider = new aws.CognitoIdentityServiceProvider({ region: awsRegion }), destroyRule = function (ruleName) { return events.listTargetsByRule({ Rule: ruleName }).promise() .then(config => {
290
0
3
23 24 25 26 27 28 29 30 31 32
console.log(chalk.red('AWS_PROFILE not set')); console.log('Please add AWS IAM user credentials to ~/.aws/credentials and specify the profile to use with the AWS_PROFILE environment variable'); return; } var cloudwatchevents = new aws.CloudWatchEvents({apiVersion: '2015-10-07'}); var params = { Name: 'chaos_lambda_schedule' };
26
285
13
84 85 86 87 88 89 90 91 92 93
var AWS = require('aws-sdk'); // Set the region AWS.config.update({region: 'REGION'}); // Create CloudWatchEvents service object var cwevents = new AWS.CloudWatchEvents({apiVersion: '2015-10-07'}); var params = { Name: 'DEMO_EVENT', RoleArn: 'IAM_ROLE_ARN',
80
71
33
+ 5 other calls in file
2 3 4 5 6 7 8 9 10 11
const AWS = require('aws-sdk') const signedAxios = require('aws-signed-axios') const Promise = require('bluebird') const browser = require('./browser') const cwEvents = new AWS.CloudWatchEvents({ endpoint: process.env.CLOUDWATCH_ENDPOINT_URL }) const s3 = new AWS.S3({ endpoint: process.env.S3_ENDPOINT_URL }) const ssm = new AWS.SSM({ endpoint: process.env.SSM_ENDPOINT_URL })
21
48
8
GitHub: cloudrig/CloudRIG
75 76 77 78 79 80 81 82 83
console.log("Triggered"); console.log(event); console.log(context); var ec2 = new AWS.EC2(); var cloudwatchevents = new AWS.CloudWatchEvents(); var lambda = new AWS.Lambda(); var ImageId; var RuleArn;
19
122
7
10 11 12 13 14 15 16 17 18 19
const AWS = require('aws-sdk'); const async = require('async'); const AlLogger = require('@alertlogic/al-aws-collector-js').Logger; function checkCloudWatchEventsRule(event, finalCallback) { var cwe = new AWS.CloudWatchEvents(); async.waterfall([ function(callback) { cwe.describeRule({Name: event.CloudWatchEventsRule}, function(err, data) { if (err) {
16
12
19
GitHub: Nike-Inc/dabber
26 27 28 29 30 31 32 33 34 35
hourly: 'rate(1 hour)', daily: 'rate(1 day)' } function scheduleBackup (options) { let events = new AWS.CloudWatchEvents({ apiVersion: '2015-10-07', region: options.s3Region }) let lambda = new AWS.Lambda({ apiVersion: '2015-03-31', region: options.s3Region }) let addPermission = promisify(lambda.addPermission.bind(lambda)) let listRules = promisify(events.listRules.bind(events)) let putRule = promisify(events.putRule.bind(events))
2
3
5
12 13 14 15 16 17 18 19 20 21
if (input.creds) params.credentials = input.creds; else if (input.profile) { var credentials = new AWS.SharedIniFileCredentials({profile: input.profile}); AWS.config.credentials = credentials; } var cloudwatchevents = new AWS.CloudWatchEvents(params); return cloudwatchevents; } me.listRules = function(input, callback) {
2
0
15
2 3 4 5 6 7 8 9 10 11
const aws = require('aws-sdk'); const chalk = require('chalk'); const inquirer = require('inquirer'); const program = require('commander'); const cloudwatch = new aws.CloudWatchEvents(); const { getRules, chooseRulePrompt,
1
0
16
aws-sdk.S3 is the most popular function in aws-sdk (7245 examples)