-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow get_aws_credentials to assume_role_with_web_identity #137
Conversation
if not token_path or not role_arn: | ||
log.warning('No web identity token file found.') | ||
return None, None, None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case seems like it should raise instead of returning the (None, None, None)
tuple and logging a warning. If you want it to use web_identity and it doesn't find the token or the role ARN, it will likely make it more difficult to diagnose why permission errors are happening (e.g. whomever is calling this may end up just defaulting to whatever standard resolution like the instance profile
We are soon going to migration our spark jobs onto driver on k8s. Which means:
Would the functional behavior of using the above flags (assume-aws-role or aws-profile or use-web-identity) remain the same? |
Seems like there's potentially two things that need to happen:
|
Is this meant to solve the |
In our latest release with Spark drivers running on k8s, we have removed the usage of |
This is specifically to solve the issue of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. This looks good to me
This change will allow the caller of get_aws_credentials to use assume_role_with_web_identity with a simple argument. This is ultimately to allow
paasta spark-run
to be used from within a Pod Identity context. The previous workaround was to create a AWS config file with a profile that did the same thing.Pairs with Yelp/paasta#3787
Manual test, after setting ENV variables with a real token:
https://fluffy.yelpcorp.com/i/9nt6FK4T2dlSScKdVF53371flGRPS05F.html