early-restaurant-74591
09/17/2025, 4:13 PMtall-airline-16756
09/17/2025, 4:13 PMtall-airline-16756
09/17/2025, 4:13 PMEGRESS_CONFIG_FILE environment variable. Just make sure your file includes important fields like api_key, api_secret, ws_url, and redis.address.
• Inline Configuration: Alternatively, you can use the EGRESS_CONFIG_BODY environment variable to define the entire configuration right within your ECS task definition. This way, you won’t need to worry about mounting volumes.
Both ways work well, so feel free to pick the one that feels best for you. If you want, I’m here to provide more details or examples—just let me know!
Sources: Session recording and transcripts | LiveKit Docs | pkg/config/service.go | Self-hosting the Egress Service | LiveKit Docsearly-restaurant-74591
09/17/2025, 10:21 PMtall-airline-16756
09/17/2025, 10:21 PMapi_key and api_secret in the LiveKit Egress YAML configuration are string values used for authentication. Here’s a helpful example YAML file with placeholders to guide you:
# Required fields
api_key: "YOUR_API_KEY" # Replace with your LiveKit API key
api_secret: "YOUR_API_SECRET" # Replace with your LiveKit API secret
ws_url: "<wss://your-livekit-server.com>" # WebSocket URL of your LiveKit server
redis:
address: "redis-host:6379" # Redis server address used by LiveKit
# username: "optional-redis-username"
# password: "optional-redis-password"
# db: 0
# Optional fields
log_level: info # Logging level: debug, info, warn, error
health_port: 8080 # Port for health checks
prometheus_port: 9090 # Port for Prometheus metrics
enable_chrome_sandbox: true # Enable Chrome sandboxing (recommended)
# Storage configuration (e.g., S3)
s3:
access_key: "YOUR_S3_ACCESS_KEY"
secret: "YOUR_S3_SECRET_KEY"
region: "us-east-1"
bucket: "your-output-bucket"
Just replace the placeholders like YOUR_API_KEY and YOUR_API_SECRET with your actual credentials. If you have any questions or need a hand with this, feel free to reach out—I’m here to help!
Sources: Self-hosting the Egress Service | LiveKit Docs | pkg/config/base.goearly-restaurant-74591
09/17/2025, 10:22 PMtall-airline-16756
09/17/2025, 10:22 PMearly-restaurant-74591
09/17/2025, 10:23 PMtall-airline-16756
09/17/2025, 10:24 PMaccess_key, secret, region, bucket) directly in the YAML configuration file under the s3 section.
• If you’re using AWS IAM roles or instance profiles, you can actually leave the credentials out of the YAML file altogether, since the service will automatically use the instance’s assigned IAM role for authentication.
Just a quick note: credentials included in application calls won’t replace those set in the YAML configuration. If anything feels unclear or you’d like me to help you step-by-step, please don’t hesitate to reach out—I’m here to help!
Sources: auth/grants_test.go | Self-hosting the Egress Service | LiveKit Docs | test/runner.goearly-restaurant-74591
09/17/2025, 10:27 PMtall-airline-16756
09/17/2025, 10:28 PMassume_role_arn and assume_role_external_id fields in your YAML configuration under the s3 section. Here’s an example to guide you:
s3:
region: "us-west-2"
bucket: "my-egress-bucket"
assume_role_arn: "arn:aws:iam::123456789012:role/LiveKitEgressRole"
assume_role_external_id: "external-id-123"
1. Optional Per-Request Configuration: If you want more flexibility, you can also include assume_role_arn and assume_role_external_id in individual egress requests.
2. Fallback Mechanism: And just so you know, if no access key and secret are provided, the service will automatically use the IAM role assigned to the instance, if that’s available.
If you have any questions or need a hand setting up the IAM role or tweaking the YAML configuration, please don’t hesitate to reach out. I’m here to help!
Sources: auth/grants_test.go | pkg/config/base.go | Egress & Media Processing | livekit/livekit_composite | DeepWiki | Egress output types | LiveKit Docsearly-restaurant-74591
09/17/2025, 10:35 PMtall-airline-16756
09/17/2025, 10:36 PMaccess_key or secret in your YAML file. A simple S3 configuration would look like this:
s3:
region: "us-west-2" # AWS region of your S3 bucket
bucket: "my-egress" # Name of your S3 bucket
This way, the LiveKit Egress service will use your instance’s IAM role to handle authentication smoothly. If you have any questions or want me to walk you through it, just let me know—I’m here to help!
Sources: pkg/config/base.goearly-restaurant-74591
09/17/2025, 10:37 PMtall-airline-16756
09/17/2025, 10:38 PMregion and bucket values in quotation marks unless they include special characters or might be unclear. Both of these ways work perfectly:
# Without quotation marks
region: us-east-1
bucket: mybucket
# With quotation marks
region: "us-east-1"
bucket: "my-egress"
Feel free to choose whichever style feels right to you or matches the rest of your configuration. If you have any more questions or need a hand with anything else, just let me know—I’m here to help!
Sources: config.go | README.md | egress-sample.yamlearly-restaurant-74591
09/17/2025, 10:46 PMtall-airline-16756
09/17/2025, 10:47 PMegress-config.yaml includes all the necessary fields. For S3 access using the IAM role, leave access_key, secret, and region empty. Here’s an example to guide you:
api_key: your-livekit-api-key
api_secret: your-livekit-api-secret
ws_url: <wss://your-livekit-server-url>
redis:
address: your-redis-host:6379
s3:
access_key: ""
secret: ""
region: ""
bucket: "your-s3-bucket-name"
1. Mount the EFS Volume: In your ECS task definition, set up the EFS volume like this:
"volumes": [
{
"name": "egress-config-volume",
"efsVolumeConfiguration": {
"fileSystemId": "fs-xxxxxxxx",
"rootDirectory": "/",
"transitEncryption": "ENABLED"
}
}
]
Then, don’t forget to mount it in your container definition:
"mountPoints": [
{
"sourceVolume": "egress-config-volume",
"containerPath": "/app/config",
"readOnly": false
}
]
1. Set the Environment Variable: Add EGRESS_CONFIG_FILE to your container definition to point to your config file:
"environment": [
{
"name": "EGRESS_CONFIG_FILE",
"value": "/app/config/egress-config.yaml"
}
]
1. Assign the IAM Role: Make sure your ECS task has an IAM role with the right S3 permissions, and reference it like this:
"taskRoleArn": "arn:aws:iam::123456789012:role/ecs-livekit-egress-role"
1. Enable Chrome Sandbox (if needed): If your setup requires it, add the SYS_ADMIN capability for Chrome sandboxing:
"linuxParameters": {
"capabilities": {
"add": ["SYS_ADMIN"]
}
}
1. Allocate Resources: It’s important to allocate enough resources—set at least 4 CPUs and 4 GB memory for your task:
"cpu": "4096",
"memory": "4096"
If you have any questions or want me to walk you through any of these steps in more detail, just let me know. I’m here to help!
Sources: Self-hosting the Egress Service | LiveKit Docs | test/runner.goearly-restaurant-74591
09/17/2025, 11:20 PMtall-airline-16756
09/17/2025, 11:21 PMearly-restaurant-74591
09/18/2025, 3:21 AMport: 7880 and health_port: 9090. Why would egress ignore the main API port setting while respecting other config values?"_