Skip to content

Instantly share code, notes, and snippets.

@cya9nide
cya9nide / ec2cleanup.rb
Last active January 11, 2018 23:10
ec2 cleanup with cloudwatch metrics, similar to the ebscleanup script
require 'aws-sdk'
require 'logger'
require 'json'
# Logging options
@log = Logger.new('ec2cleanup.log','weekly')
@log_candidate = Logger.new('ec2candidates.log','weekly')
# shared profile account
@profile = "profilename"