Class: Composer::AWS::EC2

Inherits:
Object
  • Object
show all
Defined in:
lib/composer/aws/ec2.rb

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ EC2

Returns a new instance of EC2.



4
5
6
7
8
# File 'lib/composer/aws/ec2.rb', line 4

def initialize(args)
  @config = args[:config]
  @logger = @config.logger
  @region = @config.region
end

Instance Method Details

#key_pairsObject



10
11
12
13
14
# File 'lib/composer/aws/ec2.rb', line 10

def key_pairs
  ec2.regions[@region].key_pairs
rescue ::AWS::EC2::Errors::AuthFailure => e
  raise Composer::AwsEc2Error.new e.message
end