Lambda media archiving flow hangs on S3 upload retry

The Lambda handler bombs out with a 403 Forbidden right after pulling the pre-signed URL from the /api/v2/media/{mediaId}/download endpoint. I’ve got the archiving event firing correctly, and the gateway resolver passes the payload fine, but the actual stream download chokes on the first chunk. The response headers look standard, yet the Node fetch call doesn’t return the audio buffer. It’s weird because the token scope includes media:download, and the same endpoint works in Postman. I suspect the pre-signed URL expiration is clashing with the Lambda cold start delay, or maybe the region routing is dropping the connection halfway through. Logs show the stream closes early. No idea why the crypto transform blocks the pipe.

Here is the exact flow I’m running: 1. grab the stream via the media endpoint 2. pipe it through AES-256 encryption using the crypto module 3. push the blob to S3 with a YYYY/MM/DD partition key. The adaptive retry logic for S3 throttling keeps backoff timing off, so the upload hangs until the function times out. I’m updating the interaction metadata via /api/v2/analytics/icd-interactions/events with the new storage reference, but the batch call fails when the array gets past fifty items. The retry wrapper just spins without throwing a clean error. Buffer size is set to sixteen kilobytes. Maybe the chunk transform is dropping frames.