Method: EC2::Host::Config.aws_config

Defined in:
lib/ec2/host/config.rb

.aws_configObject



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/ec2/host/config.rb', line 70

def self.aws_config
  return @aws_config if @aws_config
  if File.readable?(aws_config_file)
    ini = IniFile.load(aws_config_file).to_h
    if aws_profile == 'default'
      @aws_config = ini['default']
    else
      @aws_config = ini["profile #{aws_profile}"]
    end
  end
  @aws_config ||= {}
end