You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using a federated (ie SSO) account does not work with the existing aws_mixin.rb. It throws the following:
Must specify userName when calling with non-User credentials (Aws::IAM::Errors::ValidationError)
To fix I had to update the get_aws_account_id method at line 34 to use the STS client instead of the IAM client:
def get_aws_account_id(credentials:)
iam = Aws::STS::Client.new(region: 'us-east-1', credentials: credentials)
user = iam.get_caller_identity
user[:arn].match('^arn:aws:sts::([0-9]{12}):.*$')[1]
end
end
The text was updated successfully, but these errors were encountered:
Using a federated (ie SSO) account does not work with the existing aws_mixin.rb. It throws the following:
Must specify userName when calling with non-User credentials (Aws::IAM::Errors::ValidationError)
To fix I had to update the get_aws_account_id method at line 34 to use the STS client instead of the IAM client:
The text was updated successfully, but these errors were encountered: