Skip to content

Instantly share code, notes, and snippets.

@mndoci
Forked from yoppi/aws_app.rb
Created February 7, 2013 17:22
Show Gist options
  • Save mndoci/4732550 to your computer and use it in GitHub Desktop.
Save mndoci/4732550 to your computer and use it in GitHub Desktop.
require 'aws-sdk'
require 'yaml'
tag_name = ARGV.shift
tag_values = ARGV
AWS.config(YAML.load_file('config.yml'))
p AWS::EC2.new.instances.tagged(tag_name).tagged_values(tag_values).map {|instance|
instance.public_dns_name
}.join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment