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
Spent quite a while trying to get this code snippet to work: https://hvac.readthedocs.io/en/stable/usage/auth_methods/aws.html#lambda-and-or-ec2-instance
I believe it is missing the session token which I've updated below.
def infer_credentials_from_iam_role(iam_role): on_lambda = 'AWS_LAMBDA_FUNCTION_NAME' in os.environ if on_lambda: return os.environ['AWS_ACCESS_KEY_ID'], os.environ['AWS_SECRET_ACCESS_KEY'], os.environ['AWS_SESSION_TOKEN'] else: security_credentials = load_aws_ec2_role_iam_credentials(iam_role) return security_credentials['AccessKeyId'], security_credentials['SecretAccessKey'], security_credentials['Token'] access_key_id, secret_access_key, token = infer_credentials_from_iam_role('vaultSecretAccess') client.auth.aws.iam_login(access_key_id, secret_access_key, token)
The text was updated successfully, but these errors were encountered:
added session_token to lambda example code ref: hvac#640
91ba68d
No branches or pull requests
Spent quite a while trying to get this code snippet to work:
https://hvac.readthedocs.io/en/stable/usage/auth_methods/aws.html#lambda-and-or-ec2-instance
I believe it is missing the session token which I've updated below.
The text was updated successfully, but these errors were encountered: