Sync IVS Real-Time recording configuration#1
Open
stevethomas wants to merge 2 commits into
Open
Conversation
Adds a `sync:recording` command that provisions the S3 + IVS Real-Time resources needed for composite recording of IVS Real-Time stages to S3. Originally authored by Seth Sharp against codinglabsau/yolo#21 (targeted at the 1.x branch). Duplicated here so it can ship on yolo-alpha while LP is still mid-migration. Namespace + pint sweeps applied to match the yolo-alpha codebase. ### yolo.yml ```yaml aws: ivs: recording: real_time: true ``` Omitting `recording` skips all recording steps — no change for existing deployments. ### sync ```bash yolo-alpha sync:recording production ``` After running, three values are printed for the app's .env: - AWS_IVS_REALTIME_RECORDINGS_BUCKET - AWS_IVS_STORAGE_CONFIGURATION_ARN - AWS_IVS_ENCODER_CONFIGURATION_ARN ### What sync:recording provisions | Step | What it creates | |---|---| | SyncIvsRealtimeRecordingBucketStep | S3 bucket; policy allows `ivs-composite.{aws.region}.amazonaws.com` to write with `bucket-owner-full-control`, grants MediaConvert role read access. Ownership set to BucketOwnerPreferred | | SyncIvsStorageConfigurationStep | IVS Real-Time StorageConfiguration pointing at that bucket | | SyncIvsEncoderConfigurationStep | IVS Real-Time EncoderConfiguration (720p30 @ 2.5 Mbps) | All run in the single aws.region. Each step is idempotent (returns SYNCED when the resource already exists) and skips gracefully when aws.ivs.recording.real_time is not set. ### IAM permissions for the user running yolo-alpha | Policy | Why | |---|---| | AmazonS3FullAccess | Create recording bucket + bucket policy/ownership | | IVSFullAccess | Create StorageConfiguration and EncoderConfiguration | ### Notes - Bucket name auto-generated via Helpers::keyedResourceName() to avoid global S3 name collisions - BucketOwnerPreferred ownership is required because IVS writes objects with the bucket-owner-full-control ACL - No IAM roles are provisioned for recording (sync:iam unchanged) - IVS composite recording outputs TS-based HLS — directly compatible with the existing MediaConvert pipeline, no FFmpeg/pre-processing step required Co-Authored-By: Seth Sharp <58869086+SethSharp@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
All parallel pest processes shared the same /tmp/yolo-test directory and the same yolo.yml inside it. Process A wrote its manifest, process B overwrote it, process A read the wrong file — surfacing as intermittent IntegrityCheck / TypeError failures. Pre-existing latent bug; got unlucky with parallel ordering as ManifestTest grew, exposing the race. Tests still passed deterministically when run serially (which is why the alpha extraction + pint sweep CI runs went green). Use TEST_TOKEN (paratest sets this per worker) with getmypid() fallback to give each process its own temp dir. Verified: 5 consecutive --parallel --processes=4 runs all 54/54. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problems are you solving?
Adds a
sync:recordingcommand that provisions the S3 + IVS Real-Time resources needed for composite recording of IVS Real-Time stages to S3.Is there anything the reviewer needs to know to deploy this?
1. yolo.yml
Omitting
recordingskips all recording steps — no change for existing deployments.2. Sync
After running, three values are printed for the app's
.env:3. IAM permissions for the user running yolo-alpha
AmazonS3FullAccessIVSFullAccessWhat
sync:recordingprovisionsSyncIvsRealtimeRecordingBucketStepivs-composite.{aws.region}.amazonaws.comto write withbucket-owner-full-control, and grants the MediaConvert role read access. Ownership set toBucketOwnerPreferredSyncIvsStorageConfigurationStepSyncIvsEncoderConfigurationStepAll run in the single
aws.region. Each step is idempotent (returnsSYNCEDwhen the resource already exists) and skips gracefully whenaws.ivs.recording.real_timeis not set.Recording format
IVS composite recording outputs TS-based HLS — directly compatible with the existing MediaConvert pipeline, no FFmpeg/pre-processing step required.
Notes
Helpers::keyedResourceName()to avoid global S3 name collisionsBucketOwnerPreferredownership is required because IVS writes objects with thebucket-owner-full-controlACLsync:iamunchanged)