require 'aws-sdk' module Tagenv module Ec2 class TagUtil def self.convert_tag_hash(tags) result = {} tags.each {|hash| result[hash['key'] || hash[:key]] = hash['value'] || hash[:value] } result end end end end