Skip to content

fix(aws): omit static key/secret/token for RefreshableCredentials in …#4004

Open
tderk wants to merge 2 commits into
dlt-hub:develfrom
ScalefreeCOM:fix/4003-aws-refreshable-creds-s3fs
Open

fix(aws): omit static key/secret/token for RefreshableCredentials in …#4004
tderk wants to merge 2 commits into
dlt-hub:develfrom
ScalefreeCOM:fix/4003-aws-refreshable-creds-s3fs

Conversation

@tderk
Copy link
Copy Markdown

@tderk tderk commented May 30, 2026

…to_s3fs_credentials

When the underlying boto3 default chain returns RefreshableCredentials (ECS task role, EKS IRSA, EC2 instance profile, assumed role, SSO), extracting access_key/secret_key/session_token into plain strings and passing them as static s3fs kwargs freezes the credentials at pipeline init time. After the provider rotates the temporary token mid-process, dlt keeps sending the stale snapshot and S3 PutObject dies with ExpiredToken on long-running writes.

Detect the RefreshableCredentials case and omit key/secret/token so s3fs falls back to its own aiobotocore default chain, which honors the same provider and refreshes transparently before expiry.

Static credentials (env vars, explicit IAM user keys) are passed through unchanged.

Closes #4003

Description

Related Issues

  • Fixes #...
  • Closes #...
  • Resolves #...

Additional Context

tderk added 2 commits May 30, 2026 10:44
…to_s3fs_credentials

When the underlying boto3 default chain returns RefreshableCredentials
(ECS task role, EKS IRSA, EC2 instance profile, assumed role, SSO),
extracting access_key/secret_key/session_token into plain strings and
passing them as static s3fs kwargs freezes the credentials at pipeline
init time. After the provider rotates the temporary token mid-process,
dlt keeps sending the stale snapshot and S3 PutObject dies with
ExpiredToken on long-running writes.

Detect the RefreshableCredentials case and omit key/secret/token so
s3fs falls back to its own aiobotocore default chain, which honors the
same provider and refreshes transparently before expiry.

Static credentials (env vars, explicit IAM user keys) are passed
through unchanged.

Closes dlt-hub#4003
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.

filesystem destination: s3fs credentials frozen on snapshot, no refresh — ExpiredToken on long S3 writes (ECS/IRSA/EC2 task roles)

1 participant