lib/heroku_config/aws_key.rb in heroku-config-0.1.0 vs lib/heroku_config/aws_key.rb in heroku-config-0.2.0

- old
+ new

@@ -34,10 +34,15 @@ ) resp.user_name end def wait_until_usable(key, secret) + puts "Checking if new AWS key is usable yet." delay, retries = 5, 0 + sts = Aws::STS::Client.new( + access_key_id: key, + secret_access_key: secret, + ) begin sts.get_caller_identity true rescue Aws::STS::Errors::InvalidClientTokenId => e puts "#{e.class}: #{e.message}"