bulky-elephant-39024
08/01/2025, 4:05 PMtall-airline-16756
08/01/2025, 4:05 PMtall-airline-16756
08/01/2025, 4:06 PMassume_role_arn and assume_role_external_id fields in your S3 configuration. Here's an example:
storage:
s3:
assume_role_arn: "arn:aws:iam::123456789012:role/egress-s3-upload"
assume_role_external_id: "your-external-id"
bucket: "your-bucket-name"
region: "your-region"
When assume_role_arn is provided without access keys, LiveKit will use the AWS SDK to assume the specified IAM role and generate temporary credentials for S3 uploads. Ensure the IAM role has the necessary permissions for S3 operations.
Sources: auth/grants_test.go | README.md | s3.gobulky-elephant-39024
08/01/2025, 4:08 PMtall-airline-16756
08/01/2025, 4:08 PMassume_role_arn and assume_role_external_id fields, which let the SDK smoothly make an AssumeRole API call to take on the role you specify. If you need a hand with this, just let me know!
Sources: protobufs/livekit_egress.proto | README.mdbulky-elephant-39024
08/01/2025, 4:09 PMtall-airline-16756
08/01/2025, 4:10 PMassume_role_arn and assume_role_external_id fields. That said, there’s a small hiccup: the type hints file (.pyi) doesn’t yet show these fields in the S3Upload class definition.
Don’t worry though, the functionality should still work just fine! Here are a few tips to keep things smooth:
• Double-check that your type hints are up to date by regenerating the .pyi file if you need to.
• Give the AssumeRole fields a quick test to make sure you can access them without any issues.
• Keep an eye out for any SDK updates — they might fix this little inconsistency soon. Sources: livekit/livekit_egress.pb.go | livekit-protocol/livekit/protocol/egress.pyibulky-elephant-39024
08/01/2025, 4:28 PMS3Upload is a protobuf message, is there any way to send those fields by setting them dynamically on the message?tall-airline-16756
08/01/2025, 4:28 PMassume_role_arn and assume_role_external_id fields dynamically on the S3Upload protobuf message in the LiveKit Python SDK. Here’s a quick example to help you out:
from livekit import S3Upload
# Create an S3Upload instance
s3_config = S3Upload(
access_key="YOUR_ACCESS_KEY",
secret="YOUR_SECRET",
assume_role_arn="ARN_OF_THE_ROLE", # dynamic value
assume_role_external_id="EXTERNAL_ID" # dynamic value
)
# Update existing S3Upload instance
s3_config.assume_role_arn = "NEW_ARN"
s3_config.assume_role_external_id = "NEW_EXTERNAL_ID"
These fields are part of the S3Upload message structure, so you can tweak them anytime you need. Hope this helps!
Sources: .changeset/big-sloths-accept.mdbulky-elephant-39024
08/01/2025, 4:29 PMtall-airline-16756
08/01/2025, 4:30 PMassume_role_arn and assume_role_external_id have the right protobuf field numbers in the LiveKit Python SDK, here’s a quick guide for you:
1. These fields are set in the protobuf schema with specific numbers: assume_role_arn is field 12, and assume_role_external_id is field 13.
2. When you’re creating or updating an S3Upload instance, just assign values to these fields directly. For example:
from livekit import S3Upload
s3_config = S3Upload(
assume_role_arn="arn:aws:iam::123456789:role/yourrole",
assume_role_external_id="your_external_id"
)
1. The protobuf message will take care of mapping these fields to the right numbers when it’s serialized.
2. If you want, you can double-check the serialized output to make sure everything’s assigned correctly.
If you have any questions or want me to walk you through anything else, just let me know—I’m here to help!