Skip to content

Support for AWS session token in TensorizerConfig when using temporary credentials #186

@khalilbenayed

Description

@khalilbenayed

I'm trying to use Tensorizer to stream model weights from an S3 bucket within an EKS pod. The pod is configured with IAM Roles for Service Accounts (IRSA), and I'm using the boto3.assume_role_with_web_identity API to obtain temporary credentials.

Since Tensorizer currently requires manually setting the S3 credentials, I pass in the values returned from assume_role_with_web_identity. However, I encounter 403 Forbidden errors when attempting to stream weights. After investigation, I confirmed that the temporary credentials are valid—I can manually download S3 objects using the same credentials.

The issue appears to be that while I can provide aws_access_key_id and aws_secret_access_key, there's no way to supply the required session_token via TensorizerConfig. This token is essential for using temporary credentials granted by STS.

Feature request: Add support for an optional session_token parameter in TensorizerConfig to support IRSA and other temporary credential setups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions