Method: Jets::AwsInfo#account

Defined in:
lib/jets/aws_info.rb

#accountObject

aws sts get-caller-identity



50
51
52
53
54
55
56
57
58
59
# File 'lib/jets/aws_info.rb', line 50

def 
  return '123456789' if test?
  # ensure region set, required for sts.get_caller_identity.account to work
  ENV['AWS_REGION'] ||= region
  begin
    sts.get_caller_identity.
  rescue Aws::Errors::MissingCredentialsError
    puts "INFO: You're missing AWS credentials. Only local services are currently available"
  end
end