can i use s3 presigned url in proxy config to uplo...
# ask-ai
w
can i use s3 presigned url in proxy config to upload egress audio?
t
Thanks for reaching out, Steve. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether you can put an S3 presigned URL into the Egress
proxy
config to upload egress audio. No — you cannot use an S3 presigned URL in the proxy configuration. The Egress
proxy
field accepts a standard HTTP(S) proxy URL (with optional basic auth via `username`/`password`), and Egress uploads to S3 are performed using S3 credentials provided in the
S3Upload
config (`access_key`/`secret`). If you want, I can suggest alternative approaches for uploading egress to S3 or walk through your current egress config—which would you prefer? Sources: Egress API | LiveKit docs | Self-hosting the Egress Service | LiveKit docs | Egress output types | LiveKit docs
w
give me an example of of usage of proxy config inorder to upload
t
You're asking for an example of using the proxy config to upload egress output (e.g., audio) to S3. Below are concise examples showing the proxy fields in an S3 upload configuration. JSON example:
Copy code
{
  "room_name": "my-room",
  "file_outputs": [
    {
      "filepath": "recordings/egress-audio.mp4",
      "s3": {
        "access_key": "your-access-key",
        "secret": "your-secret-key",
        "bucket": "my-bucket",
        "region": "us-west-2",
        "proxy": {
          "url": "https://proxy.mycompany.com:8080",
          "username": "proxy-user",
          "password": "proxy-pass"
        }
      }
    }
  ]
}
JavaScript (TypeScript) SDK example:
Copy code
const fileOutput = new EncodedFileOutput({
  filepath: 'recordings/egress-audio.mp4',
  output: {
    case: 's3',
    value: new S3Upload({
      accessKey: 'your-access-key',
      secret: 'your-secret-key',
      bucket: 'my-bucket',
      region: 'us-west-2',
      proxy: {
        url: 'https://proxy.mycompany.com:8080',
        username: 'proxy-user',
        password: 'proxy-pass',
      },
    }),
  },
});

const info = await egressClient.startRoomCompositeEgress('my-room', { file: fileOutput });
Go SDK example:
Copy code
fileRequest := &livekit.RoomCompositeEgressRequest{
  RoomName: "my-room",
  Output: &livekit.RoomCompositeEgressRequest_File{
    File: &livekit.EncodedFileOutput{
      FileType: livekit.EncodedFileType_MP4,
      Filepath: "recordings/egress-audio.mp4",
      Output: &livekit.EncodedFileOutput_S3{
        S3: &livekit.S3Upload{
          AccessKey: "your-access-key",
          Secret:    "your-secret-key",
          Bucket:    "my-bucket",
          Region:    "us-west-2",
          Proxy: &livekit.ProxyConfig{
            Url:      "https://proxy.mycompany.com:8080",
            Username: "proxy-user",
            Password: "proxy-pass",
          },
        },
      },
    },
  },
}

info, err := egressClient.StartRoomCompositeEgress(ctx, fileRequest)
Notes: • The
proxy
URL must be a standard HTTP(S) proxy; basic auth is supported via `username`/`password`. • Egress uploads use S3 credentials (`access_key`/`secret`) — you cannot provide an S3 presigned URL in the
proxy
field. • Ensure the Egress service can reach the proxy endpoint from its network. Would you like this adapted for a different egress type (audio-only, segments, or GCP upload)? Sources: Egress API | LiveKit docs