Bring your Wowza Streaming Engine license to CloudFront live HTTP streaming

This article explains how to use Wowza Streaming Engine™ media server software with Amazon CloudFront for live HTTP-based streaming and global delivery. When a viewer streams a video, the video is broken into smaller chunks that are cached in the CloudFront network for improved performance and scalability.

Note: This article assumes basic familiarity with, and a license for, Wowza Streaming Engine. It also assumes you have an Amazon Web Services (AWS) account.

Contents


Create an Amazon EC2 key pair

Create an AWS CloudFormation stack for live streaming

Sign in to Wowza Streaming Engine Manager

Set up an encoder to publish a live stream

Play the live stream in a web application

Delete the AWS CloudFormation stack for live streaming

More resources


Create an Amazon EC2 key pair 


If you already have an Amazon EC2 key pair for the Amazon EC2 region in which you want to configure live streaming, skip to Create an AWS CloudFormation stack for live streaming. If you don't have a key pair in that region, follow the steps in this section.

Note: A key pair is a security credential, similar to a password, and is specific to an AWS region. You must specify a key pair when you create an AWS CloudFormation stack for live streaming (described later in this article). After live streaming is configured, you use the key pair to securely connect to your Amazon EC2 instance.
  1. Sign in to the Amazon EC2 console using your AWS account credentials.
     
  2. In the region selector, click the region in which you want to create the key pair.
    You must create the key pair in the same region where you'll create your AWS CloudFormation stack for live streaming later in this process. You should create the key pair and the stack for live streaming in the region that's closest to the location from which the live stream will be published.
     
  3. In the left navigation pane, click Key Pairs.
     
  4. In the key pairs pane, click Create Key Pair.
     
  5. In the Create Key Pair dialog box, enter a name for the key pair, and make note of the name. You'll need it later when you create an AWS CloudFormation live-streaming stack.
     
  6. Click Create, and, when prompted, save the .pem file to a safe place on your computer. Note that you won't be able to re-download this file.
     
  7. Close the Create Key Pair dialog box. 

Create an AWS CloudFormation stack for live streaming 


This section provides links to AWS CloudFormation templates for creating a stack that launches the AWS resources required by live streaming, including an Amazon EC2 instance.

  1. Start the wizard that creates an AWS CloudFormation stack by clicking an applicable link in the following table. Be sure to click a link for the Amazon EC2 region where you want AWS CloudFormation to launch an Amazon EC2 instance.
     

    Note: The links below launch Wowza Streaming Engine 4.8.5 AMIs with pre-built Amazon EC2 instances that deliver live HTTP streams over the Amazon CloudFront distribution network into the AWS Management Console. See the Wowza Streaming Engine 4.8.5 Release Notes.

    If you're not already signed in to the AWS Management Console, sign in when prompted. The wizard starts, and the selected URL automatically appears under Specify an Amazon S3 template URL.
     
  2. (Optional) In the Create a New Stack wizard, you can change the stack name to something appropriate for your live-streaming event. The stack name must not contain spaces and must be unique within your AWS account.
     
    Note: Do not change the template options or the address in Specify an Amazon S3 template URL.
  3. Click Next, and then adjust the following Parameters settings on the next page of the wizard:
     
    • In ApplicationName, enter a short name (without spaces) for your Wowza Streaming Engine application, or keep the default name.
       
    • In InstanceType, select an instance type, which determines the pricing for your Wowza Streaming Engine instance. For more information about Amazon EC2 instance types, see Available Instance Types. For information about pricing, see Amazon EC2 Pricing.
       
    • In KeyPair, enter the name of an Amazon EC2 key pair for the region in which you want to create the live streaming stack. The key pair must be associated with the account that you're currently logged on with. If you created a key pair when you performed the procedure in Create an Amazon EC2 key pair, enter that key pair name here.
       
    • In StartupPackageURL, enter a URL that points to a startup package for configuring Wowza Streaming Engine to your needs, or keep the default.
       
    • In StreamName, enter a short name (without spaces) for your live stream, or keep the default.
       
    • In WowzaLicenseKey, enter your Wowza Streaming Engine license key. If you have license keys for the Transcoder, nDVR, or DRM features, you can include them by separating the key values with a pipe (|) character.
       
      Important: If you clicked a link for an AWS CloudFormation template that charges your AWS account for a Wowza Streaming Engine license, the license is already embedded in the software and the WowzaLicenseKey setting isn't available.
  4. Click Next, and then adjust the following optional settings on the Options page of the wizard:
     
    • (Optional) Add the key-value pairs for any tags you plan to use. For more information about using tags, see Adding Tags to Your AWS CloudFormation Stack.
       
    • (Optional) To configure SNS notification, to specify how long you're willing to wait for the stack to be created, to choose whether to roll back changes if stack creation fails, and to enter a stack policy, click Advanced, and adjust settings as desired.
  5. Click Next, and then review the settings for the stack. When you're satisfied, click Create.

AWS CloudFormation may take several minutes to create the stack. To track stack creation progress, select the stack, and then click the Events tab. If AWS CloudFormation can't create the stack, the Events tab lists error messages.

When your stack is ready, in the list of stacks, the status for the stack changes to CREATE_COMPLETE.

When your stack is created, click the Outputs tab to see the stack creation outputs. You'll use these values when you set up an encoder later in the process. 

Important: You begin to incur hourly charges for an Amazon EC2 instance when you create the AWS CloudFormation stack that deploys that instance. Charges continue to accrue until you delete the AWS CloudFormation stack, regardless of whether you use the Amazon EC2 instance to stream live video. When your live event is over, delete the stack that you created for live streaming. This deletes the AWS resources that were created for your live-streaming event, and stops AWS charges for the resources. For more information, see Delete the AWS CloudFormation stack for live streaming

Sign in to Wowza Streaming Engine Manager


After AWS CloudFormation creates the stack, perform the following steps to sign in to Wowza Streaming Engine Manager on the Amazon EC2 instance that you provisioned through AWS CloudFormation:

  1. Sign in to the AWS CloudFormation Management Console using your AWS account credentials.
     
  2. In the region selector, click the region in which you created the AWS CloudFormation stack.
     
  3. In the list of stacks, select the stack that you created in Create an AWS CloudFormation stack for live streaming.
     
  4. On the Outputs tab, get the value of the WowzaServerLoginInfo key, which you'll use for login credentials in the next step.
     
  5. Click the URL in the WowzaEngineManagerURL key, for example, http://ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com:8088/enginemanager. When you're prompted for login credentials, use the WowzaServerLoginInfo key value from the previous step.
     
    Important: This URL uses port 8088 to connect to the Amazon EC2 instance that's running Wowza Streaming Engine Manager. Depending on your firewall settings, you might not be able to connect to the Amazon EC2 instance. If you have trouble, contact your network administrator. 

Set up an encoder to publish a live stream 


You need to encode a live stream captured by an encoding device before you send it to Wowza Streaming Engine. Wowza Streaming Engine supports integrated publishing for many popular encoders and cameras to simplify live streaming workflows. 

Set up an RTMP encoder

RTMP encoders typically use the following settings:

  • Publish URL: - This is the value of the AWS CloudFormation PublishRTMPURL key, for example, rtmp://ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com/livecf.
     
  • Stream Name: - This is the value of the AWS CloudFormation PublishStreamName key, for example, myStream.
     
  • Login Credentials: - If you're prompted for login credentials, use the values from the AWS CloudFormation WowzaServerLoginInfo key, for example, username=wowza, password=i-1234a567.

Play the live stream in a web application


Wowza provides online players that you can use to play a live stream from your Wowza Streaming Engine distribution. These players can help you verify that your streaming stack is set up correctly. You can use the same streaming manifest URLs for other players that support the streaming protocol you want to use.

Perform the applicable procedure below to get embed code that you can include in your webpage for the live stream:

Note: Wait at least 30 seconds after you perform the applicable procedure in Set up an encoder to publish a live stream before following the steps below to play the stream.

Play a live HLS stream on an Apple or other device via CloudFront

  1. Open the AWS CloudFormation Management Console.
     
  2. Select the stack for live HTTP streaming.
     
  3. In the AWS CloudFormation console, click the Outputs tab.
     
  4. Copy the value of the PlaybackHLSURL key, for example, http://d111111abcdef8.cloudfront.net/livecf/myStream/playlist.m3u8.
     
  5. Using one of the following applications, go to the Video Test Players webpage, click the Apple HLS tab, paste the URL that you copied in the previous step into the Stream field, and then click Connect.
     
    • Safari on a computer running OS X Snow Leopard (version 10.6) or later
       
    • QuickTime Player 10.x or later on a computer running OS X Snow Leopard (version 10.6) or later
       
    • Safari on an Apple iOS device 

Play a live DASH stream via CloudFront 

  1. Open the AWS CloudFormation Management Console.
     
  2. Select the stack for live HTTP streaming.
     
  3. In the AWS CloudFormation console, click the Outputs tab.
     
  4. Copy the value of the PlaybackDASHURL key, for example, http://d111111abcdef8.cloudfront.net/livecf/myStream/manifest.mpd.
     
  5. Go to the Video Test Players webpage, click the MPEG DASH tab, paste the URL that you copied in the previous step into the Stream field, and then click Start.
     
    Note: Open the MPEG-DASH Player example webpage in a browser that supports the MediaSource API, such as Google Chrome. 

Delete the AWS CloudFormation stack for live streaming 


When your live event is over, delete the stack that you created for live streaming. This deletes the AWS resources that were created for your live-streaming event and stops the video-on-demand charges for the resources.

  1. Open the AWS CloudFormation Management Console.
     
  2. In the upper-right corner, click the region in which you created your stack.
     
  3. Select the stack, and then click Actions > Delete Stack.
     
  4. Click Yes, Delete to confirm.
     
  5. To track the stack deletion progress, select the stack, and then click the Events tab. 

More resources