Guidance for Live Streaming on AWS with Amazon S3
Summary: This implementation guide provides an overview of the Guidance for Live Streaming on AWS with Amazon S3, its reference architecture and components, considerations for planning the deployment, and configuration steps for deploying the Guidance for Live Streaming on AWS with Amazon S3 to Amazon Web Services (AWS). This guide is intended for solution architects, business decision makers, DevOps engineers, and cloud professionals who want to implement the Guidance for Live Streaming on AWS with Amazon S3 in their environment.
Overview
Amazon Web Services (AWS) helps broadcasters and content owners to automate media supply chains, streamline content distribution, and cost-effectively broadcast live content to a global audience. With AWS, you can seamlessly scale your infrastructure to meet demand, and pay only for what you use, helping you build highly available and cost-effective live video streaming.
The Guidance for Live Streaming on AWS with Amazon S3 helps you build highly available live video streaming content using AWS Elemental MediaLive and Amazon Simple Storage Service (Amazon S3) services to deliver resilient and secure real-time viewing experiences to your customers.
This Guidance can be used only during the live event. When you finish streaming, you can delete the Guidance’s stack to help ensure that you only pay for the infrastructure you use.
Use this navigation table to quickly find answers to these questions:
| If you want to . . . | Read . . . |
|---|---|
| Know the cost for running this Guidance. | Cost |
| Understand the security considerations for this Guidance. | Security |
| Know how to plan for quotas for this Guidance. | Quotas |
| Know which AWS Regions support this Guidance. | Supported AWS Regions |
Features and benefits
Input format support
Supports four input types
- RTP_PUSH,
- RTMP_PUSH,
- URL_PULL, and
- INPUT_DEVICE as the source for your video stream, including a device input so you can use an AWS Elemental Link as the source for the input for your live channel.
Simple configuration
Automatically configures MediaLive and Amazon S3 to encode and originate your content for adaptive bitrate streaming across multiple screens via HTTP Live Streaming (HLS).
Integration with AWS Service Catalog AppRegistry and Application Manager, a capability of AWS Systems Manager
This Guidance includes a Service Catalog AppRegistry resource to register the Guidance’s CloudFormation template and its underlying resources as an application in both Service Catalog AppRegistry and Application Manager. With this integration, you can centrally manage the Guidance’s resources and enable application search, reporting, and management actions.
Use cases
Streaming Media
As consumer demand for video streaming increases, media and entertainment companies are looking for secure and reliable web-based video streaming alternatives to traditional television. With Live Streaming on AWS with Amazon S3, customers can avoid inefficient trial-and-error approaches and save on time and costs for their streaming media projects.
Concepts and definitions
This section describes key concepts and defines terminology specific to this Guidance:
Application
A logical group of AWS resources that you want to operate as a unit.
Adaptive Bit Rate (ABR)
A streaming method that adjusts the video quality based on network conditions to improve video streaming over HTTP networks.
HTTP Live Streaming (HLS)
A HTTP-based streaming protocol to deliver media over the internet and developed by Apple Inc.
QVBR
Quality-Defined Variable Bitrate is a video encoding technology that uses fewer bits in low-complexitiy periods of content, and more bits during high-completely periods (up to the maximum bitrate) delivering consistently high video quality.
For a general reference of AWS terms, see the AWS glossary in the AWS General Reference:
Architecture overview
This section provides a reference implementation architecture diagram for the components deployed with this Guidance.
Architecture diagram
Deploying this Guidance with the default parameters deploys the following components in your AWS account.

Figure 1: AWS Architecture
The AWS CloudFormation template launches the AWS products and services necessary to ingest, transcode, and deliver live streaming video.
AWS Elemental MediaLive ingests an input feed and transcodes your content into one adaptive bitrate (ABR) HTTP Live Streaming (HLS) stream as output.
Amazon Simple Storage Service (Amazon S3) provides a scalable highly available storage bucket to host the encoded segments.
An Amazon CloudFront distribution is configured to use the Amazon S3 custom endpoints as its origin. The CloudFront distribution delivers your live stream to viewers with low latency and high transfer speeds.
An Amazon S3 bucket stores the CloudFront logs.
You can configure this Guidance to ingest Real-Time Transport Protocol (RTP), Real-Time Messaging Protocol (RTMP), HTTP Live Streaming (HLS) content, or live video from an AWS Elemental Link device. The Guidance also includes three encoding profiles.
Note: AWS CloudFormation resources are created from AWS Cloud Development Kit (CDK) constructs.
AWS Well-Architected design considerations
This Guidance uses the best practices from the AWS Well-Architected Framework , which helps customers design and operate reliable, secure, efficient, and cost-effective workloads in the cloud.
This section describes how the design principles and best practices of the Well-Architected Framework benefit this Guidance.
Operational excellence
This section describes how we architected this Guidance using the principles and best practices of the operational excellence pillar.
The Live Streaming on AWS with Amazon S3 Guidance tracks all assets via AWS CloudTrail. Logs from Medialive, Amazon S3, and Amazon CloudFront provide observability into the infrastructure and the rest of the Guidance components.
Security
This section describes how we architected this Guidance using the principles and best practices of the security pillar.
To help reduce latency and improve security, Live Streaming on AWS with Amazon S3 includes an Amazon CloudFront distribution with an origin access identity, which is a special CloudFront user that helps restrict access to the Guidance’s website bucket contents.
Reliability
This section describes how we architected this Guidance using the principles and best practices of the reliability pillar.
The Guidance supports AWS Elemental Link, which offers a configuration-free, cost-efficient way to securely and reliably transfer video to MediaLive.
Performance efficiency
This section describes how we architected this Guidance using the principles and best practices of the performance efficiency pillar.
This Guidance uses MediaLive, which is currently available in specific AWS Regions only. To use an AWS Elemental Link device as an input, you must launch this Guidance in the AWS Region where the device is configured.
The Guidance is automatically tested and reviewed by Guidances architects and subject matter experts for areas to experiment and improve.
Cost optimization
This section describes how we architected this Guidance using the principles and best practices of the cost optimization pillar.
The cost for running the Guidance varies based on a number of factors, including the encoded profile selected, the bitrate of the live stream, and the number of viewers.
Customers can measure the efficiency of the workloads, and the costs associated with delivery, by using Application Manager.
Sustainability
This section describes how we architected this Guidance using the principles and best practices of the sustainability pillar.
Live Streaming on AWS with Amazon S3 uses managed and serverless services, to minimize the environmental impact of the backend services. Customers can run this Guidance only during the live event and delete the stack after the program ends, reducing the carbon footprint compared to the footprint of continually operating on-premises servers.
Architecture details
This section describes the components and AWS services that make up this Guidance and the architecture details on how these components work together.
AWS Elemental Link input configuration
This Guidance includes support for the AWS Elemental Link device as a source for live streaming content. AWS Elemental Link offers a configuration-free, cost-efficient way to securely and reliably transfer video to MediaLive. For more details on the device, refer to the AWS Elemental Link product page.
To configure this Guidance to use an AWS Elemental Link device you need the following:
A Link device powered on and connected to the internet.
The Link device ID. To find the device ID, sign in to the AWS Elemental MediaLive console and navigate to MediaLive Devices in the AWS Region where your device is registered. The device is listed with the Link device ID.
Launch the Guidance in the same Region as the Link device with the following parameters:
Source Input Type - INPUT_DEVICE
AWS Elemental Link Input Device ID - The ID of the Link device from the MediaLive console. You can only attach a Link device to one input at a time. If the Link device is already attached to an input, you cannot create a new input using that device.
Encoding Profile - Select the profile that best matches your source resolution.
Start MediaLive Channel - If your device is ready to stream, select true. Otherwise, select false—you can start the MediaLive channel through the MediaLive console when you’re ready to stream.
Note: For a full list of input types and configuration details, refer to Creating an input in the _AWS Elemental MediaLive User Guide_.

Figure 2: AWS Elemental Link Input Configuration
URL Pull (HLS) input configuration
URL Pull provides the option to ingest an HLS stream over HTTP or HTTPS. The following parameters are required to configure the Guidance to ingest an HLS stream:
Source Input Type - URL_PULL
Source URL - The HTTP(s) link to the HLS stream manifest file. The default value is a demo stream from AWS.
Source Username - Only required if you have basic authentication setup on your source HLS stream.
Source Password - Only required if you have basic authentication setup on your source HLS stream.
Encoding Profile - Select the profile that best matches your source resolution.
Start MediaLive Channel - If your device is ready to stream, select true. Otherwise, select false – you can start the MediaLive channel through the AWS console when you’re ready to stream.
Note: Refer to Creating an input in the _AWS Elemental MediaLive User Guide_ for a full list of input types and configuration details.

Figure 3: URL Pull (HLS) Input Configuration
RTMP Push and RTP Push input configuration
RTP and RTMP Push provide the option to push a transport stream (TS) MediaLive. In both options, the following parameters are required to configure the Guidance:
Source Input Type - RTP_PUSH / RTMP_PUSH
Input Security Group CIDR Block - A valid CIDR block used to create a security group to restrict access to the MediaLive input.
Encoding Profile - Select the profile that best matches your source resolution.
Start MediaLive Channel - If your device is ready to stream, select true. Otherwise, select false—you can start the MediaLive channel through the AWS console when you’re ready to stream.
Note: Refer to the Creating an input topic in the _AWS Elemental MediaLive User Guide_ for a full list of input types and configuration details.

Figure 4: RTMP Push and RTP Push Input Configuration
Amazon CloudWatch metrics
The Live Streaming on AWS with Amazon S3 Guidance activates Amazon CloudWatch metrics to monitor Amazon S3 requests made to the live stream distribution bucket. Out of the 16 metrics available for Amazon S3 requests, the following metrics are used for this Guidance:
- All requests
- PUT requests
- DELETE requests
- HEAD requests
- LIST requests
- Bytes downloaded
- Bytes uploaded
- 4xx errors
- 5xx errors
- First byte latency
- Total request latency
To deactivate CloudWatch metrics for the live stream distribution bucket, remove the metrics filter:
Sign in to the AWS CloudFormation console.
On the Stacks page, select the Guidance stack.
Select the Outputs tab.
View bucket metrics by selecting the hyperlink for the BucketMetrics output.
Choose Manage filters, then select the filter.
Choose Delete.
AWS services in this Guidance
| AWS service | Description |
|---|---|
| AWS Elemental MediaLive | Core. Ingests an input feed and transcodes your content into one adaptive bitrate (ABR) HTTP Live Streaming (HLS) stream as output. |
| Amazon S3 | Core. Provides storage to host the encoded segments. |
| Amazon CloudFront | Core. Delivers your live stream to viewers with low latency and high transfer speeds. |
| Amazon CloudWatch | Supporting. Monitors S3 requests made to the distribution bucket. |
| AWS CloudFormation | Supporting. This Guidance is distributed as a CloudFormation template and stack, which deploy the AWS resources for the Guidance. |
| AWS IAM | Supporting. Allows for fine-grained access permissions. |
| AWS Systems Manager | Supporting. Provides application-level resource monitoring and visualization of resource operations and cost data. |
| AWS Elemental Link | Optional. Device to connect a video source on-premises to MediaLive. |
Plan your deployment
This section describes the cost, security, Regions, and other considerations prior to deploying the Guidance.
Cost
You are responsible for the cost of the AWS services used while running this Guidance. As of this revision, the cost for running this Guidance with default settings in the US East (N. Virginia) Region with:
Approximately 1,000 viewers for a one-hour live event using a standard definition (SD)-540p encoding profile is approximately $1.76 for live encoding and packaging + $67.24 for 791 GB distribution = $69.00 for the one-hour event.
Approximately 10,000 viewers for a one-hour live event using a high definition (HD)-1080p encoding profile is approximately $3.18 for live encoding and packaging + $1531.49 for 18,017 GB distribution = $1,534.67 for the one-hour event.
These cost estimates depend on many factors, which are detailed in the following cost examples.
Note: The examples provided are likely higher than the actual costs of running this Guidance. The intent was to provide a guide to the pricing that is easily understood. Where assumptions were needed, we used factors that were straightforward to calculate and also likely be more expensive than the actual cost.
For an additional cost example for streaming a live event, refer to FAQs about live streaming on AWS in the AWS Media Blog.
Cost example 1
Cost example 1 covers a use case of approximately 1,000 viewers viewing a live event for about one hour with a SD-540p encoding profile selected in the CloudFormation template. This cost example is based on the following factors:
Pricing Region: us-east-1, assuming standard pricing (no free-tier or discounts).
Viewers consume the highest bitrate: While bitrate consumption is a mix of all the streams, we used the highest bitrate in the calculation to show the upper cost range. Additionally, the Quality-Defined Variable Bitrate (QVBR) and variable video complexity can result in an output bandwidth that is 10-50% lower in price than the estimate provided in Table 1.
99% cache/hit ratio between the content delivery network (CDN) and Amazon S3.
Note: Storage of the test player is not included in this cost estimate.
Table 1 summarizes the total pricing for the live streaming event. Tables 2 through 4 breaks down the cost for each AWS service.
| AWS service | Function | Cost per hour [USD] |
|---|---|---|
| AWS Elemental MediaLive | Input and outputs for channel | $1.71 |
| Amazon S3 | Storage | $0.01 |
| Amazon S3 | Requests | $0.04 |
| Amazon CloudFront | Distribution | $67.24 |
| Total: | $69.00 |
Table: Cost breakdown for 1,000 viewers for a one-hour live event
AWS Elemental MediaLive pricing
Table 2 breaks down the MediaLive pricing which assumes HD AVC input and SD AVC outputs with less than 10 Mbps bitrate and less than 30 frames per second (fps) frame rate.
| Input / output | Cost per hour [USD] |
|---|---|
| HD Input (AVC 10-20Mbps) | $0.294 |
| Output 1 SD (512x288, 400k) | $0.354 |
| Output 2 SD (640x360, 800k) | $0.354 |
| Output 3 SD (768x432, 1,200k) | $0.354 |
| Output 4 SD (960x540, 1,800k) | $0.354 |
| Total: | $1.71 |
Table: MediaLive pricing
Amazon S3 pricing
Amazon S3 charges $0.023 per Gigabyte (GB) per month for the first 50 Terabytes (TB) stored in the bucket. The volume of storage billed in a month is based on the average storage used throughout the month. This can be determined by size of objects and how long they are stored. For this example, 21 segments for 4 bitrates are stored at all times. The cost of storage per hour is as follows:
Add the bitrate of all streams in Kbps:
400k + 800k + 1,200k + 1,800k = 4,200 Kbps
Calculate size of four-second segment (for all bitrates combined):
4,200 Kbps * 4 seconds = 16,800 Kb
Total size of segments stored at a time:
16,800 Kb * 21 segments = 352,800 Kb
Total Kb-hour usage:
352,800 Kb * 1 hour storage = 352,800 Kb-hours
Convert to GB-months:
352,800 Kb-hours / 8 bits per byte / 1,000,000 Kb per GB / 744 hours in month = 0.00006 GB-months
0.00006 GB-months * $0.023 = $0.000001 per hour of storage
The cost will continue to accumulate per hour as long as the objects are not removed from the bucket. Cost of storage is billed monthly.
| Input / output | Kbps |
|---|---|
| Output 1 SD (512x288, 400k) | 400 |
| Output 2 SD (640x360, 800k) | 800 |
| Output 3 SD (768x432, 1,200k) | 1,200 |
| Output 4 SD (960x540, 1,800k) | 1,800 |
| Total Kbps: | 4,200 |
| Compute total Kb stored (4200 kbps * 4 seconds * 21 segments) | 352,800 Kb |
| GB-month usage for one hour | 0.00006 GB |
| Cost (GB/hour * $0.023) | $0.000001/hour |
Table: Amazon S3 storage pricing
Amazon S3 charges $0.005 per 1,000 requests for PUT, COPY, POST, and LIST requests. This example has four input streams, so the number of requests can be approximated by the following:
Calculate the number of segments:
3,600 seconds of content / 4 second segments = 900 segments 900 segments * 4 input streams = 3,600 segments
Calculate the number of manifest updates:
4 input streams * 3,600 seconds of content / updates every 4 seconds = 3,600 manifest updates
Add total segments to total manifest updates to get the number of PUT requests:
3,600 + 3,600 = 7,200 PUT requests per hour
| Request | Quantity |
|---|---|
| PUT ts segments | 3,600 |
| PUT manifest files | 3,600 |
| Total requests: | 7,200 |
| Cost (total requests/1000 * $0.005) | $0.036/hour |
Table: Amazon S3 request pricing
Data transfers from S3 to Amazon CloudFront are free of charge.
Viewer traffic pricing
The cost estimate for viewer traffic assumes that all viewers get the highest bitrate for the one-hour live streaming event.
| AWS service | Function | Cost per hour [USD] |
|---|---|---|
| Amazon CloudFront | Average Mbps per viewer | 1.8 |
| Amazon CloudFront | Total MB per second (1,000 x 1.8 / 8) | 225 |
| Amazon CloudFront | Total egress per hour (225 / 1,024 x 60 x 60) | 791 GB/hour |
| Total (791 GB * $0.085): | $67.24 |
Table: Viewer traffic pricing
Cost example 2
Cost example 2 covers a use case of approximately 10,000 viewers viewing a live event for about one hour with an HD-1080p encoding profile selected in the CloudFormation template. This cost example is based on the following factors:
Pricing Region: us-east-1, assuming standard pricing (no free-tier or discounts).
Viewers consume the highest bitrate: Note that bitrate consumption is a mix of all the streams, but the highest bitrate is used in the calculation to show the upper cost range. Additionally, the QVBR and variable video complexity can result in an output bandwidth that is 10-50% lower in price than the estimate provided in Table 6.
99% cache/hit ratio between the CDN and Amazon S3.
Note: Storage of the test player is not included in this cost estimate.
Table 6 summarizes the total pricing for the live streaming event. Tables 7 through 10 break down the cost for each AWS service.
| AWS service | Function | Cost per hour [USD] |
|---|---|---|
| AWS Elemental MediaLive | Input and outputs for channel | $3.11 |
| Amazon S3 | Storage | $0.01 |
| Amazon S3 | Requests | $0.06 |
| Amazon CloudFront | Distribution | $1,531.49 |
| Total: | $1,534.67 |
Table: Cost breakdown for 10,000 viewers for a one-hour live event
AWS Elemental MediaLive pricing
Table 7 breaks down the MediaLive pricing which assumes HD AVC input and both SD and HD AVC outputs with less than 10 Mbps bit rate and less than 30 fps frame rate.
| Input / output | Cost per hour [USD] |
|---|---|
| HD Input (AVC, 10-20Mpbs) | $0.294 |
| Output 1 SD (512x288, 400k) | $0.354 |
| Output 2 SD (640x360, 800k) | $0.354 |
| Output 3 SD (768x432, 1,200k) | $0.354 |
| Output 4 SD (960x540, 1,800k) | $0.354 |
| Output 5 HD (1280x720p, 2,700k) | $0.702 |
| Output 6 HD (1920x1080p, 4,100k) | $0.702 |
| Total: | $3.11 |
Table: MediaLive pricing
Amazon S3 pricing
As detailed in Cost Example 1, Amazon S3 pricing is based on GB of storage per month. Table 8 shows the conversion from Kbps to Kb stored to GB/month usage to get the total GB of storage for the hour-long stream.
| Input / output | Kbps |
|---|---|
| Output 1 (512x288_400k) | 400 |
| Output 2 (640x360_800k) | 800 |
| Output 3 (768x432_1,200k) | 1,200 |
| Output 4 (960x540_1,800k) | 1,800 |
| Output 5 (1280x720p_2,700k) | 2,700 |
| Output 6 (1920x1080p_4,100k) | 4,100 |
| Total Kbps | 11,000 |
| Compute total Kb stored (11,000 Kbps * 4 seconds * 21 segments) | 924,000 Kb |
| GB-month usage for one hour (924,000 Kb-hours / 8 bits per byte / 1,000,000 Kb per GB / 744 hours) | 0.0002 |
| Total (GB/hour * $0.023) | $0.000005 |
Table: Amazon S3 storage pricing
| Request | Quantity |
|---|---|
| PUT ts segments | 5,400 |
| PUT manifest files | 5,400 |
| Total requests: | 10,800 |
| Cost (total requests/1000 * $0.005) | $0.054/hour |
Table: Amazon S3 request pricing
Viewer traffic pricing
The cost estimate for viewer traffic assumes that all viewers get the highest bitrate for the one-hour live streaming event.
| AWS service | Function | Total |
|---|---|---|
| Amazon CloudFront | Average Mbps per viewer | 4.10 |
| Amazon CloudFront | Total MB per sec (10,000 x 4.1 / 8) | 5,125 |
| Amazon CloudFront | Total egress per hour (5,125 / 1,024 x 60 x 60) | 18,017 GB/hour |
| Total cost (18,017 GB * $0.085): | $1,531.49 |
Table: Viewer traffic pricing
Note: Pricing is per minute, with a minimum of 10 minutes. Prices are subject to change.
Amazon CloudWatch metrics cost
Amazon CloudWatch charges $0.30 per metric per month for the first 10,000 metrics. This Guidance uses 11 metrics, so the cost for an hour-long stream can be determined by:
11 (number of metrics) * 1 (hours of streaming) / 720 (hours per month) * $0.30 = $0.005
For more information about metrics, refer to Amazon CloudWatch metrics.
We recommend creating a budget through AWS Cost Explorer to help manage costs. Prices are subject to change. For full details, refer to the pricing webpages for each AWS service used in this Guidance.
Security
When you build systems on AWS infrastructure, security responsibilities are shared between you and AWS. This shared responsibility model reduces your operational burden because AWS operates, manages, and controls the components including the host operating system, the virtualization layer, and the physical security of the facilities in which the services operate. For more information about AWS security, visit AWS Cloud Security.
IAM roles
IAM roles allow customers to assign granular access policies and permissions to services and users on the AWS Cloud. This Guidance creates IAM roles that grant the Guidance’s AWS Lambda functions access to create Regional resources.
Amazon CloudFront
This Guidance deploys a static website hosted in an Amazon S3 bucket. To help reduce latency and improve security, this Guidance includes an Amazon CloudFront distribution with an origin access identity, which is a CloudFront user that helps restrict access to the Guidance’s website bucket contents. For more information, see Restricting Access to Amazon S3 Content by Using an Origin Access Identity in the _Amazon CloudFront Developer Guide_.
Supported AWS Regions
This Guidance uses the MediaLive service, which is not currently available in all AWS Regions. For the most current availability of AWS services by Region, see the AWS Regional Services List.
To use an AWS Elemental Link device as an input, you must launch this Guidance in the AWS Region where the device is configured.
Live Streaming on AWS with Amazon S3 is available in the following AWS Regions:
| Region name | Region name |
|---|---|
| US East (Ohio) | Canada (Central) |
| US East (N. Virginia) | Europe (Frankfurt) |
| US West (Oregon) | Europe (Ireland) |
| Asia Pacific (Mumbai) | Europe (London) |
| Asia Pacific (Seoul) | Europe (Paris) |
| Asia Pacific (Singapore) | Europe (Stockholm) |
| Asia Pacific (Sydney) | South America (Sao Paulo) |
| Asia Pacific (Tokyo) |
Quotas
Service quotas, also referred to as limits, are the maximum number of service resources or operations for your AWS account.
Quotas for AWS services in this Guidance
Make sure you have sufficient quota for each of the services implemented in this Guidance. For more information, see AWS service quotas.
Use the following links to go to the page for that service. To view the service quotas for all AWS services in the documentation without switching pages, view the information in the Service endpoints and quotas page in the PDF instead.
AWS CloudFormation quotas
Your AWS account has AWS CloudFormation quotas that you should be aware of when launching the stack in this Guidance. By understanding these quotas, you can avoid limitation errors that would prevent you from deploying this Guidance successfully. For more information, see AWS CloudFormation quotas in the _AWS CloudFormation User’s Guide_.
Encoding profiles
The Live Streaming on AWS with Amazon S3 Guidance configures MediaLive with one of three progressive, 30 frames per second encoding profiles. Choose one of the following encoding profiles.
HD-1080p profile - 1920x1080, 1280x720, 960x540, 768x432, 640x360, 512x288
HD-720p profile - 1280x720, 960x540, 768x432, 640x360, 512x288
SD-540p profile - 960x540, 768x432, 640x360, 512x288
Demo content
The Guidance includes a link to a demo HTTP Live Streaming (HLS) stream hosted in an Amazon S3 bucket, which lets you test the Guidance without having to set up and configure a live stream. Deploying the Guidance with default parameters, launches the demo.
Guidance updates
To continue using this Guidance with the latest features and improvements, you must deploy the latest version of the AWS CloudFormation template as a new stack. This Guidance does not support updating an existing stack. For information to deploy the latest AWS CloudFormation template as a new stack, refer to Launch the stack. After the new stack completes deployment, we recommend uninstalling the previous version to save on costs.
Deploy the Guidance
The are 2 options for deploying the Guidance: using the CDK deployment tools or running the build script to generate a CFN template and the packaged Lambda code.
Before you launch the Guidance, review the cost, architecture, network security, and other considerations discussed earlier in this guide.
Note: This Guidance uses MediaLive, which is currently available in specific AWS Regions only. Therefore, you must launch this Guidance in an AWS Region where this service is available. For the most current service availability by Region, refer to the AWS Regional Services List.
Important: This Guidance includes an option to send anonymized operational metrics to AWS. We use this data to better understand how customers use this Guidance and related services and products. AWS owns the data gathered though this survey. Data collection is subject to the AWS Privacy Notice.
To opt out of this feature, download the template, modify the AWS CloudFormation mapping section, and then use the AWS CloudFormation console to upload your updated template and deploy the Guidance. For more information, see the Anonymized data collection section of this guide.
Prerequisites:
- AWS Command Line Interface
- Node.js 12.x or later
- AWS CDK 1.102.0
Option 1: Deploying through the CDK.
This options simply flollows the standard CDK deployment process. You will need to run cdk bootstrap before you run cdk deply the first time to setup the cdk resource in your AWS account.
- Download or clone the repo and make the required changes to the source code.
- Install the dependecies for the Lambda function and construct.
- Run
cdk deploy(first time use you will need to runcdk bootstrapfirst)
cd ./source/custom-resource
npm install --production
cd ../constructs
npm install
cdk bootstrap //if you havent already done so.
cdk deploy
Option 2: Generate a CloudFormation template.
The CloudFormation template (generated by the CDK) includes a Lambda backed custom resource to configure MediaLive and create a UUID. To launch the solution the Lambda source code has to be deployed to an Amazon S3 bucket in the region you intend to deploy the solution.
1. Clone the repo
Download or clone the repo and make any required changes to the source code.
2. (Optional) Run unit tests for customization
Run unit tests to make sure any added customization passes the tests:
cd ./deployment
chmod +x ./run-unit-tests.sh && ./run-unit-tests.sh
3. Create an Amazon S3 Bucket
The CloudFormation template is configured to pull the Lambda deployment packages from Amazon S3 bucket in the region the template is being launched in. Create a bucket in the desired region with the region name appended to the name of the bucket. eg: for us-east-1 create a bucket named: my-bucket-us-east-1
aws s3 mb s3://my-bucket-us-east-1
4. Create the deployment packages
Build the distributable:
chmod +x ./build-s3-dist.sh
./build-s3-dist.sh <my-bucket> live-streaming-on-aws-with-amazon-s3 <version>
Notes: The build-s3-dist script expects the bucket name as one of its parameters. This value should not have the region suffix (remove the -us-east-1)
Ensure that you are owner of the AWS S3 bucket.
aws s3api head-bucket --bucket my-bucket-us-east-1 --expected-bucket-owner YOUR-AWS-ACCOUNT-NUMBER
Deploy the distributable to the Amazon S3 bucket in your account:
aws s3 sync ./regional-s3-assets/ s3://my-bucket-us-east-1/live-streaming-on-aws-with-amazon-s3/<version>/
aws s3 sync ./global-s3-assets/ s3://my-bucket-us-east-1/live-streaming-on-aws-with-amazon-s3/<version>/
5. Launch the Stack.
The default configuration deploys the core and supporting services found in the AWS services in this Guidance section, but you can customize the template to meet your specific needs.
Note: AWS CloudFormation resources are created from AWS Cloud Development Kit (AWS CDK) constructs.
Follow the step-by-step instructions in this section to configure and deploy the Guidance into your account.
Time to deploy: Approximately five minutes
Locate the live-streaming-on-aws-with-amazon-s3.template in your S3 bucket and copy the URL.
Open the CloudFormation console
On the Create stack page, paste the S3 template URL in the Amazon S3 URL text box and choose Next.
On the Specify stack details page, assign a name to your Guidance stack. For information about naming character limitations, see IAM and AWS STS quotas, name requirements, and character limits in the _AWS Identity and Access Management User Guide_.
Under Parameters, review the parameters for this Guidance template and modify them as necessary. This Guidance uses the following default values.
| Parameter | Default | Description |
|---|---|---|
| Source Input Type | URL_PULL | Specify the input type for MediaLive: RTP_PUSH, RTMP_PUSH, URL_PULL (HLS), or INPUT_DEVICE (AWS Elemental Link). Detailed instructions for each input type can be found in the appendix. |
| Source URL | <Optional input> | If you selected URL_PULL for Source Input Type, enter the URL for your source stream. By default, this parameter contains the primary demo source URL. |
| Source Username | <Optional input> | If you selected URL_PULL for Source Input Type, enter the username for your source stream if using authentication. This value will be stored securely in AWS Systems Manager Parameter Store. |
| Source Password | <Optional input> | If you selected URL_PULL for Source Input Type, enter the password for you source stream if using authentication. This value will be stored securely in AWS Systems Manager Parameter Store. |
| Input Security Group CIDR Block | <Optional input> | For RTP_PUSH and RTMP_PUSH input types, specify the CIDR block to restrict access to the MediaLive input endpoint. This should be the IP or IP range of you your source stream location/network. |
| Encoding Profile | HD-720p | Specify the encoding profile to use with MediaLive. |
| Start MediaLive Channel | No | Choose whether to start the MediaLive channel when the Guidance is created. We recommend starting the channel if using the demo preview player. |
Select Next.
On the Configure stack options page, choose Next.
On the Review page, review and confirm the settings. Select the box acknowledging that the template will create IAM resources.
Choose Create stack to deploy the stack.
You can view the status of the stack in the AWS CloudFormation console in the Status column. You should receive a CREATE_COMPLETE status in approximately five minutes.
Note: To test the live stream playback, navigate to the AWS CloudFormation stack Outputs tab, copy the Amazon CloudFront URL, and open the URL in any player compatible with HTTP Live Streaming (HLS). For more details, refer to Amazon CloudWatch metrics.
Monitoring the Guidance with AWS Service Catalog AppRegistry
The Guidance includes a Service Catalog AppRegistry resource to register the CloudFormation template and underlying resources as an application in both Service Catalog AppRegistry and Application Manager.
Application Manager gives you an application-level view into this Guidance and its resources so that you can:
Monitor its resources, costs for the deployed resources across stacks and AWS accounts, and logs associated with this Guidance from a central location.
View operations data for the Guidance’s AWS resources (such as deployment status, Amazon CloudWatch alarms, resource configurations, and operational issues) in the context of an application.
The following figure depicts an example of the application view for this Guidance stack in Application Manager.

Figure 5: Application Manager
Live Streaming on AWS with Amazon S3 stack in Application Manager
Note: You must activate CloudWatch Application Insights, AWS Cost Explorer, and cost allocation tags associated with this Guidance. They are not activated by default.
Activate CloudWatch Application Insights
Sign in to the Systems Manager console.
In the navigation pane, choose Application Manager.
In Applications, choose AppRegistry applications.
In AppRegistry applications, search for the application name for this Guidance and select it.
The next time you open Application Manager, you can find the new application for your Guidance in the AppRegistry application category.
In the Components tree, choose the application stack you want to activate.
In the Monitoring tab, in Application Insights, select Auto-configure Application Monitoring.

Figure 6: Application Insights Screen
Monitoring for your applications is now activated and the following status box appears:

Figure 7: Monitoring Enabled
Activate AWS Cost Explorer
You can see the overview of the costs associated with the application and application components within the Application Manager console through integration with AWS Cost Explorer which must be first activated. Cost Explorer helps you manage costs by providing a view of your AWS resource costs and usage over time. To activate Cost Explorer for the Guidance:
Sign in to the AWS Cost Management console.
In the navigation pane, select Cost Explorer.
On the Welcome to Cost Explorer page, choose Launch Cost Explorer.
The activation process can take up to 24 hours to complete. Once activated, you can open the Cost Explorer user interface to further analyze cost data for the Guidance.
Activate cost allocation tags associated with the Guidance
After you activate Cost Explorer, you must activate the cost allocation tags associated with this Guidance to see the costs for this Guidance. The cost allocation tags can only be activated from the management account for the organization. To activate cost allocation tags:
Sign in to the AWS Billing and Cost Management console.
In the navigation pane, select Cost Allocation Tags.
On the Cost allocation tags page, filter for the AppManagerCFNStackKey tag, then select the tag from the results shown.
Choose Activate.
The activation process can take up to 24 hours to complete and the tag data to appear.
Confirm cost tags associated with the Guidance
After you activate cost allocation tags associated with the Guidance, you must confirm the cost allocation tags to see the costs for this solution. To confirm cost allocation tags:
Sign in to the Systems Manager console.
In the navigation pane, choose Application Manager.
- In Applications, choose the application name for this Guidance and select it.
In the Overview tab, in Cost, select Add user tag.

Figure 8: Add User Tag
- On the Add user tag page, enter confirm, then select Add user tag.
The activation process can take up to 24 hours to complete and the tag data to appear.
Update the Guidance
If you have previously deployed the Guidance, use the following instructions to upgrade your Guidance to the latest version:
Uninstall the previously deployed Guidance. Refer to Uninstall the Guidance.
Deploy the latest version. Refer to Deploy the Guidance.
Uninstall the Guidance
You can uninstall the Live Streaming on AWS with Amazon S3 Guidance from the AWS Management Console, or by using the AWS Command Line Interface (AWS CLI). You must manually delete the Amazon S3 buckets created by this Guidance. AWS Guidances do not automatically delete these resources in case you have stored data to retain.
Deleting the AWS CloudFormation stack
Using the AWS Management Console
Sign in to the CloudFormation console.
On the Stacks page, select this Guidance’s installation stack.
Choose Delete.
Using AWS Command Line Interface
Determine whether the AWS Command Line Interface (AWS CLI) is available in your environment. For installation instructions, see What Is the AWS Command Line Interface in the AWS CLI User Guide. After confirming that the AWS CLI is available, run the following command.
aws cloudformation delete-stack --stack-name <installation-stack-name>
Deleting the Amazon S3 buckets
This Guidance is configured to retain the Guidance-created Amazon S3 buckets if you decide to delete the AWS CloudFormation stack to prevent accidental data loss. After uninstalling the Guidance, you can manually delete this S3 bucket if you do not need to retain the data. Follow these steps to delete the Amazon S3 buckets.
Using the AWS Management Console
Sign in to the Amazon S3 console.
Choose Buckets from the left navigation pane.
Locate the <stack-name> S3 buckets.
Select the S3 buckets and choose Delete.
Using AWS Command Line Interface
To delete the S3 buckets using AWS CLI, run the following command:
aws s3 rb s3://<bucket-name> --force
Alternatively, you can configure the AWS CloudFormation template to delete the Amazon S3 buckets automatically. Before deleting the stack, change the deletion behavior in the AWS CloudFormation DeletionPolicy attribute.
Developer guide
This section provides the source code for the Guidance.
Source code
Visit our GitHub repository to download the source files for this Guidance and to share your customizations with others.
The AWS Cloud Development Kit (AWS CDK) generates the Live Streaming on AWS with Amazon S3 template. See the README.md file for additional information.
Reference
This section includes information about an optional feature for collecting unique metrics for this Guidance and a list of builders who contributed to this Guidance.
Anonymized data collection
This Guidance includes an option to send anonymized operational metrics to AWS. We use this data to better understand how customers use this Guidance and related services and products. When invoked, the following information is collected and sent to AWS:
Solution ID - The AWS Guidance identifier
Unique ID (UUID) - Randomly generated, unique identifier for each Guidance for Live Streaming on AWS with Amazon S3 deployment
Timestamp - Data-collection timestamp
Launch Data - The AWS Region where the stack was launched
Source Input Type - The input type selected at launch
Encoding Profile - The encoding profile selected at launch
ChannelStart - The option to start the MediaLive channel selected at launch
AWS owns the data gathered though this survey. Data collection is subject to the Privacy Notice. To opt out of this feature, complete the following steps before launching the AWS CloudFormation template.
Download the AWS CloudFormation template to your local hard drive.
Open the CloudFormation template with a text editor.
Modify the CloudFormation template mapping section from:
AnonymizedData: SendAnonymizedData: Data: Yesto:
AnonymizedData: SendAnonymizedData: Data: NoSign in to the AWS CloudFormation console.
Select Create stack.
On the Create stack page, Specify template section, select Upload a template file.
Under Upload a template file, choose Choose file and select the edited template from your local drive.
Choose Next and follow the steps in Launch the stack in the Deploy the Guidance section of this guide.
Contributors
- Tom Nightingale
- Tom Gilman
- Joan Morgan
- Eddie Goynes
- Sam Dim Ciin
- Kiran Patel
- Jill Adams
- David Chung
- Raul Marquez
- Sean Byrne
- Damian McNamara
Revisions
For more information, refer to the CHANGELOG.md file in the GitHub repository.
| Date | Change |
|---|---|
| May 2020 | Release v1.0.0 Initial release |
| June 2020 | Release v1.1.0 Added support for AWS Elemental Link. |
| December 2020 | Release v1.2.0 Updated the AWS CloudFormation template. |
| July 2021 | Release v1.2.1 Bug fixes. Documentation updates: Expanded the cost estimates to provide more granular information, clarified the collection of operational metrics information, and updated guide organization to improve readability. |
| September 2021 | Release v2.0.0 Bug fixes. |
| January 2022 | Release v2.1.1 Bug fixes. |
| March 2022 | Release v3.0.0 Updated to use Amazon S3 rather than AWS MediaStore as live streaming origin. |
| August 2022 | Release v3.1.0 Bug fixes. |
| November 2022 | Release v3.1.1 AppRegistry: AppRegistry Application Stack Association and Application Insights. |
| April 2023 | Release v3.1.2 Mitigated impact caused by new default settings for S3 Object Ownership (ACLs disabled) for all new S3 buckets. |
| May 2023 | Release v3.2.0 Updated Lambda nodes to support Node.js 16. Added AppRegistry updates to include logical ID. Added package_lock.json files to packages. Improved security patching to remediate vulnerable dependencies. Updated parameter names for consistency. |
| August 2023 | Release v3.2.1 Updated npm package dependencies in /source/constructs. Updated to Node.js 18 and JavaScript SDK to v3. |
| October 2023. | Release v3.2.2 Updated package versions to resolve security vulnerabilities. For more information, refer to |
| November 2023 | Documentation update: Added Confirm cost tags associated with the Guidance section. |
| February 2026 | Documentation update: Format changes to suppport conversion from Solution to Guidance. Update of deployment instructions to match source repo README |
Notices
Customers are responsible for making their own independent assessment of the information in this document. This document: (a) is for informational purposes only, (b) represents current AWS product offerings and practices, which are subject to change without notice, and (c) does not create any commitments or assurances from AWS and its affiliates, suppliers or licensors. AWS products or services are provided “as is” without warranties, representations, or conditions of any kind, whether express or implied. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.
Live Streaming on AWS with Amazon S3 is licensed under the terms of the Apache License 2.0 available at The Apache Software Foundation.