🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

awscdk-construct-hls-session-runner

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

awscdk-construct-hls-session-runner

AWS CDK construct for deploying a Lambda function and SFN state machines to fetch an HLS manifest

0.0.6
latest
Version published
Weekly downloads
21
10.53%
Maintainers
1
Weekly downloads
 
Created

awscdk-construct-hls-session-runner

AWS CDK construct for deploying a Lambda function and SFN state machines to fetch an HLS manifest

Usage

import { SessionRunner } from 'awscdk-construct-hls-session-runner';

export class MyStack extends Stack {
  constructor(scope: Construct, id: string, props: StackProps = {}) {
    super(scope, id, props);
    const eventStartTime = new Date('2025-03-26T00:00:00Z');
    const eventEndTime = new Date('2025-03-26T00:30:00Z');
    const graph = [
      { pointInSeconds: 0 * 60, sessionVolume: 10 },
      { pointInSeconds: 5 * 60, sessionVolume: 30 },
      { pointInSeconds: 10 * 60, sessionVolume: 50 }, // 50 viewers join 10 minutes after the event start
      { pointInSeconds: 20 * 60, sessionVolume: 50 },
      { pointInSeconds: 25 * 60, sessionVolume: 30 },
      { pointInSeconds: 30 * 60, sessionVolume: 10 },
    ];
    const hlsEndpointUrl = 'https://example.com/live/index.m3u8';

   // Create a session runner
    new SessionRunner(this, 'SessionRunner', {
      eventStartTime,
      eventEndTime,
      intervalInSeconds: 2,
      sessionRequirements: {
        growthPattern: 'LINEAR',
        graph,
      },
      hlsEndpointUrl,
      concurrency: 10, // Requests will be made by 10 different SFN state machines
    });
  }
}

FAQs

Package last updated on 26 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts