-
Notifications
You must be signed in to change notification settings - Fork 222
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
Added aws-java-sdk-sts to jar-dependencies #70
base: master
Are you sure you want to change the base?
Conversation
@mmatviyiv STSAssumeRoleSessionCredentialsProvider class is already deprecated(https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/STSAssumeRoleSessionCredentialsProvider.html). I assume that STSAssumeRoleSessionCredentialsProvider is not supported in kcl. Have you tried to run your consumer code when you set the AWSCredentialsProvider as STSAssumeRoleSessionCredentialsProvider in property file successfully? There is an error in my side: "Unable to load AWS credentials from any provider in the chain". |
hi @jiawen-earnin thanks for your comment Could you show your app
Also, please check your |
Hi @mmatviyiv Yeah, I defined the AWSCredentialsProvider = STSAssumeRoleSessionCredentialsProvider|arn:aws:iam:::role/|<session_name> and in my config file I defined something like this: then I export the AWS_PROFILE variable in the following way: |
@jiawen-earnin I just duplicated a part of AWS configs to both config: [default]
region=us-west-2
[profile my_profile_name]
role_arn = arn:aws:iam::88888888888:role/MyRoleName
region=us-west-2
source_profile = default credentials: [default]
aws_access_key_id=my_access_key_id
aws_secret_access_key=my_aws_secret_access_key
[my_profile_name]
role_arn = arn:aws:iam::88888888888:role/MyRoleName
source_profile = default Also, I noticed that exporting just #!/usr/bin/env sh
export AWS_DEFAULT_REGION=us-west-2
export AWS_REGION=us-west-2
export AWS_DEFAULT_PROFILE=my_profile_name
# show assume-role and the active session, nice for debugging
aws configure list
aws sts get-caller-identity
python3 bin/auditit.properties.py
$(python3 /amazon-kinesis-client-python/samples/amazon_kclpy_helper.py --print_command --java java --properties bin/auditit.properties) |
Hi @mmatviyiv Thank you ! But I have found something else interesting. There is a cli/cache/ directory be created and there is a json file in it which includes the info like this: The sessionToken seems to be expired. Do you think that if I use STSAssumeRoleSessionCredentialsProvider, a temporary credentials will be created. I delete that json file in cache folder but the error "unable to load aws credentials" still appears. Did you met this issue before and how did you handle that ? Thanks |
@jiawen-earnin no, unfortunately, didn't meet such cache. But anyway try to check your AWS config with those commands: aws configure list
aws sts get-caller-identity Just type it into your system console and check the output, it should show if there are any issues with your configuration |
Has this repo been abandoned? This has been siting for months. |
any update on this ? still not able to use assume role credentials~ |
This would allow using
STSAssumeRoleSessionCredentialsProvider
for assume-roles authorization, for example in case of cross account signin.Properties example: