Skip to content

Support aws_session_token for S3 backends - #2462

Merged
bghira merged 1 commit into
mainfrom
feature/aws-session-tokens
Jan 20, 2026
Merged

Support aws_session_token for S3 backends#2462
bghira merged 1 commit into
mainfrom
feature/aws-session-tokens

Conversation

@bghira

@bghira bghira commented Jan 20, 2026

Copy link
Copy Markdown
Owner

This pull request adds support for AWS session tokens throughout the S3 data backend, ensuring compatibility with temporary AWS credentials (such as those used with IAM roles or STS). The changes update the configuration, backend initialization, and S3 connection logic to accept and use an aws_session_token parameter.

Key changes include:

AWS session token support in configuration:

  • Added aws_session_token as an optional field to ImageBackendConfig and included it in serialization and deserialization logic in simpletuner/helpers/data_backend/config/image.py. [1] [2] [3]
  • Included aws_session_token in the passthrough keys for TextEmbedConfig in simpletuner/helpers/data_backend/config/text_embed.py.

Backend and connection logic updates:

  • Updated S3DataBackend and its builder to accept and propagate the aws_session_token parameter, ensuring it is passed to the underlying boto3 S3 client in simpletuner/helpers/data_backend/aws.py and simpletuner/helpers/data_backend/builders/aws.py. [1] [2] [3] [4] [5]
  • Modified the S3 connectivity test function to accept and use aws_session_token for authentication in simpletuner/helpers/data_backend/aws.py. [1] [2]

@bghira
bghira merged commit 7a5f5ea into main Jan 20, 2026
2 checks passed
@bghira
bghira deleted the feature/aws-session-tokens branch January 26, 2026 02:55
samzhang996-hue pushed a commit to samzhang996-hue/SimpleTuner that referenced this pull request Apr 27, 2026
Support aws_session_token for S3 backends
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.

1 participant