Skip to content
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

Possible fix for aws profile assumeRole from ec2InstanceRole issues: #3038

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gss2002
Copy link

@gss2002 gss2002 commented Oct 18, 2023

Possible fix for aws profile assumeRole from ec2InstanceRole issues:

#1521
#1713

Issue #, if available:
#1521 and #1713

*Description of changes: *
This code change is a possible solution to resolve using AWS Profile files not correctly utilizing credential_source such as Ec2InstanceMetadata and being forced to only utilize AccessKey/Secret. I have tested with AWS's official version of the Redshift JDBC Driver and it does work and solve the problem of not being able to utilize credential_source. I was able to successfully test with AWS's Redshift JDBC Driver using Ec2InstanceMetadata and utilized assumeRole operation to use a different role both in the local account and in a cross account methodology.

Example of what did not work with aws-java-sdk v1 before this fix.

[default]
credential_source=Ec2InstanceMetadata
region=us-east-1
output=json

[redshift_iam]
role_arn=arn:aws:iam::xxxxxxxxxxxx:role/xxxx-data-dev-idmc-poc
region=us-east-1
source_profile=default
output=json

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@gss2002 gss2002 changed the title Possible for for aws profile assumeRole from ec2InstanceRole issues: Possible fix for aws profile assumeRole from ec2InstanceRole issues: Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant