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

Add option to use session token in S3 target credentials #83

Open
jessedadams opened this issue Nov 8, 2024 · 0 comments
Open

Add option to use session token in S3 target credentials #83

jessedadams opened this issue Nov 8, 2024 · 0 comments

Comments

@jessedadams
Copy link

The S3 target initialization takes an access key ID and a secret access key. Here is the relevant mercure code:

def create_client(self, target: S3Target):
   return boto3.client(
       "s3",
       region_name=target.region,
       aws_access_key_id=target.access_key_id,
       aws_secret_access_key=target.secret_access_key,
   )

However, some temporary S3 credentials also require a session token. Here is an example of the initialization:

client = boto3.client(
    's3',
    aws_access_key_id=ACCESS_KEY,
    aws_secret_access_key=SECRET_KEY,
    aws_session_token=SESSION_TOKEN
)

It would be very helpful to be able to specify a session token in the mercure S3 target, otherwise temporary credentials are unable to be used in mercure.

Thanks!

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

No branches or pull requests

1 participant