We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/JuliaCloud/AWSCore.jl/blob/v0.6.2/src/AWSCredentials.jl#L220
When the creds.account_number from the AWSConfig is an empty string, we are instead returning the user ARN.
creds.account_number
AWSConfig
This doesn't seem correct.
The text was updated successfully, but these errors were encountered:
That function call populates the user ARN and the account number and doesn't return the ARN ever (phew).
The code however is confusing and at least deserves a comment but I would recommend making a new function that just does the populating:
function _populate!(creds::AWSCredentials) r = Services.sts(aws, "GetCallerIdentity", []) creds.user_arn = r["Arn"] creds.account_number = r["Account"] return creds end function aws_user_arn(aws::AWSConfig) creds = aws[:creds] if creds.user_arn == "" _populate!(creds) end return creds.user_arn end function aws_account_number(aws::AWSConfig) creds = aws[:creds] if creds.account_number == "" _populate!(creds) end return creds.account_number end
Sorry, something went wrong.
Ah you're right, I miss read the return statement. I'll include this as part of my NFC CR coming up.
return
No branches or pull requests
When the
creds.account_number
from theAWSConfig
is an empty string, we are instead returning the user ARN.This doesn't seem correct.
The text was updated successfully, but these errors were encountered: