Class: Propono::AwsConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/propono/components/aws_config.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ AwsConfig

Returns a new instance of AwsConfig.



9
10
11
# File 'lib/propono/components/aws_config.rb', line 9

def initialize(config)
  @config = config
end

Instance Method Details

#aws_optionsObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/propono/components/aws_config.rb', line 13

def aws_options
  if @config.use_iam_profile
    {
      :use_iam_profile => true,
      :region => @config.queue_region
    }
  else
    {
      :aws_access_key_id => @config.access_key,
      :aws_secret_access_key => @config.secret_key,
      :region => @config.queue_region
    }
  end
end