Skip to content

Instantly share code, notes, and snippets.

View lfalmeida's full-sized avatar

Luis Fernando de Almeida lfalmeida

View GitHub Profile
@lfalmeida
lfalmeida / modify-ec2-instance-type.js
Created November 13, 2018 13:17 — forked from eddmann/modify-ec2-instance-type.js
Scheduled EC2 Instance Type Modification using Lambda and CloudWatch Events
// Demonstration video can be found at: https://youtu.be/_gJyK1-NGq8
// ModifyEC2InstanceType
const AWS = require('aws-sdk');
exports.handler = (event, context, callback) => {
const { instanceId, instanceRegion, instanceType } = event;
const ec2 = new AWS.EC2({ region: instanceRegion });