We’re setting up LiveKit Egress to upload recordin...
# ask-ai
c
We’re setting up LiveKit Egress to upload recordings directly to an S3 bucket. I wanted to confirm whether LiveKit currently supports using an AWS IAM Role directly — i.e., without providing long-lived
access_key
and
secret_key
credentials in the S3 configuration. Our goal is to allow LiveKit’s AWS account (or the Egress service) to assume a role in our AWS account that has limited permissions (like
s3:PutObject
,
s3:PutObjectAcl
), instead of using static credentials. In other words, we want to configure something like:
Copy code
s3 = api.S3Upload(
    bucket="my-bucket",
    region="us-east-1",
    assume_role_arn="arn:aws:iam::<account-id>:role/LiveKitEgressRole"
)
…without having to specify
access_key
or
secret
. Does LiveKit’s egress service support that kind of role-based access today? Or does it still require `access_key`/`secret_key` even if a role ARN is provided?
t
Thanks for reaching out, Divyanshu. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Hi there! I wanted to share some helpful info about LiveKit Egress and AWS IAM Role-based access for S3 uploads. It’s great because you don’t need to provide
access_key
and `secret_key`—as long as the Egress service is running in an AWS environment that supports automatic credential resolution through IAM roles. This includes EC2 instances with instance profiles or EKS clusters using IRSA (IAM Roles for Service Accounts). Here are a few key details to keep in mind: • If you leave out the
access_key
and
secret_key
, the AWS SDK will try to get temporary credentials from the instance metadata service (IMDS) or IRSA. • The
assume_role_arn
field is supported, but it does need initial credentials to make the STS
AssumeRole
API call, so it’s not completely key-free. For the smoothest, fully key-free experience, we recommend running LiveKit Egress on EC2 or EKS with the right IAM roles attached. If you’d like, I’m here to help you set this up or answer any questions you might have—just let me know! Sources: pkg/config/base.go | Self-hosting the Egress Service | LiveKit docs | livekit/livekit_egress.pb.go | livekit-protocol/src/livekit.rs