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
{ | |
"objects": [ | |
{ | |
"name": "DefaultDataFormat1", | |
"id": "DataFormatId_XXXX", | |
"type": "CSV" | |
}, | |
{ | |
"role": "DataPipelineDefaultRole", | |
"subject": "SUCCESS:ETL JOB FOR LOGS TO S3", |
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
{ | |
"instanceIdList": [ | |
"test-db" | |
], | |
"action": "stop" | |
} |
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
{ | |
"instanceIdList": [ | |
"test-db" | |
], | |
"action": "start" | |
} |
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 AWS = require('aws-sdk'); | |
var rds = new AWS.RDS(); | |
var date = new Date(); | |
var snapshotName = date.getDate() + '-' + date.getMonth() + '-' + date.getFullYear() + '-' + date.getHours() + '-' + date.getMinutes() + '-' + date.getSeconds(); | |
exports.handler = function(event, context, callback) { | |
if (event.instanceIdList === null || event.instanceIdList.size === 0) { | |
console.log('Instance List is empty'); | |
} else { |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Action": [ | |
"rds:StopDBInstance", | |
"rds:StartDBInstance" | |
], | |
"Effect": "Allow", | |
"Resource": "XXXXX" |