Method: Jets::AwsInfo#account
- Defined in:
- lib/jets/aws_info.rb
#account ⇒ Object
aws sts get-caller-identity
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/jets/aws_info.rb', line 50 def account 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.account rescue Aws::Errors::MissingCredentialsError puts "INFO: You're missing AWS credentials. Only local services are currently available" end end |