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
// To works proberly we need to: | |
// - configure Lambda Environment Variable | |
// - Add an execution role with DescribeInstances and PutDashboard | |
let AWS = require('aws-sdk'); | |
let ec2 = new AWS.EC2(); | |
let cw = new AWS.CloudWatch(); | |
exports.handler = async (event) => { | |
var instances_description = await describeAllInstances(); |