-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
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
read_credentials() can't parse nested values #19
Comments
By the way - the reason I'm running into this is that I'm trying to use role-based authentication, and running |
@kenahoo I tried a workaround like in the following code snippet, looks like it gets the STS credentials (as it should). My problem with it is that the created signatures from these credentials are incorrect. YMMV awsNestedProfile <- function(profileName) {
library(aws.signature)
library(aws.iam)
credentials <- aws.signature::read_credentials()[[profileName]]
aws.signature::use_credentials(profile = credentials$SOURCE_PROFILE)
aws.iam::assume_role(credentials$ROLE_ARN, "Rsession", use=TRUE)
} |
@kenahoo in most packages, like Long story short, until this is fixed - you probably need to manually pass Example: aws.iam::get_caller_identity(session_token = aws.signature::locate_credentials()$session_token) |
@kenahoo So, that looks like a config file, not a credentials file. At present, there's no support here for config files. I'm not sure if I'll add them as it introduces a ton of further complexity but I'm open to discussion and PRs. |
@kesor Can you show me some documentation for this? Neither the official AWS docs nor the boto docs show that these fields are part of |
@leeper for me it just works, probably because aws-cli and boto and other tools just treat |
Okay. Thanks. |
I have a section in my
~/.aws/credentials
file that looks like this:That fails to parse properly:
http://boto3.readthedocs.io/en/latest/guide/configuration.html#configuration-file says that this is a "nested configuration value", but doesn't give much more guidance - I couldn't find the "Nested Configuration section" it mentions. However, this format does get parsed properly by the
aws
command-line tool itself.I'm using:
The text was updated successfully, but these errors were encountered: