Class: Awful::Sts
Instance Method Summary collapse
Methods inherited from Cli
Constructor Details
This class inherits a constructor from Awful::Cli
Instance Method Details
#assume_role(arn, name) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/awful/sts.rb', line 18 def assume_role(arn, name) opts = only_keys_matching(symbolize_keys(), %i[duration_seconds policy]) params = { role_arn: arn, role_session_name: name }.merge(opts) sts.assume_role(params).tap do |session| puts YAML.dump(stringify_keys(session.to_hash)) end end |