Using Amazon CloudFront with Instant TV Channel

This step-by-step walk-through will guide you through the process of using Amazon CloudFront to distribute public Roku content such as poster images, logo artwork, or video/audio streams. CloudFront is used to deliver your content using a global network of edge locations. Roku player requests for your content are automatically routed to the nearest edge location, so content is delivered with the best possible performance.

To use Amazon CloudFront with Instant TV Channel, you will:

  • Store the original versions of your poster artwork or streams on one or more origin servers. An origin server is the location of the definitive version of the file, and can be your own hosted web server, or it could be an Amazon S3 bucket. The walk-through below will cover using an S3 bucket as the origin server.
  • Create a CloudFront Distribution to register your origin servers through the AWS Management Console.
  • Use your CloudFront Distribution's domain name as part of the poster URLs or streaming URLs in your Roku channel. When a Roku player requests a poster or stream using this domain name, the player is automatically routed to the nearest edge location for high performance delivery of the content.

Create an Amazon S3 bucket to use as an origin server:

  1. Log into your AWS (Amazon Web Services) account and go to the S3 section of your AWS control panel.
  2. Click the Create Bucket button.
  3. Provide a Bucket Name, for example "my-origin-bucket".

    Very Important: Use only lower-case characters, digits, and dashes in your bucket name. Instant TV Channel does not support the use of upper-case characters or other symbols in bucket names.

    Good Bucket Name: test-bucket
    Good Bucket Name: bucket123
    Bad Bucket Name: test.bucket (contains unsupported period character ".")
    Bad Bucket Name: bucket+123 (contains unsupported plus character "+")

  4. The bucket Region should be set to "US East (N. Virginia)".
  5. Click the Create button, do not click the Next button.

At this point your new S3 bucket is ready to store files that will be used by CloudFront.

You can upload files to the new bucket by clicking the Upload button in the S3 control panel.

Create a public CloudFront distribution:

  1. Log into your AWS (Amazon Web Services) account and go to the CloudFront section of your AWS control panel.
  2. From the left-hand Navigation panel, click Distributions.
  3. Click the Create Distribution button.
  4. Select Get Started under the Web section. Do not select the RTMP section which is used for Flash streaming and is not compatible with Roku players.
  5. Under Origin Settings, click in the Origin Domain Name box, and select the S3 bucket previously created to use as the origin server for this CloudFront distribution.
  6. Under Origin Settings, locate the Restrict Bucket Access setting and select "Yes".
  7. Under Origin Settings, locate the Origin Access Identity setting and select "Create a New Identity".
  8. Under Origin Settings, locate the Grant Read Permissions on Bucket setting and select "Yes, Update Bucket Policy".
  9. Under Distribution Settings, enter a comment to identify this CloudFront Distribution, for example "My 1st CloudFront Distribution".
  10. Click the blue Create Distribution button.
  11. From the left-hand Navigation panel, click Distribution again.
  12. Click the row containing the Distribution that you just created, then click the Distribution Settings button.
  13. Record the domain name which will look something like this: d77m7fxh64v63a.cloudfront.net. The domain name will be used to access your CloudFront content from your Roku channel.

If a poster named "poster.jpg" is stored in the origin S3 bucket, and the CloudFront domain name is "d77m7fxh64v63a.cloudfront.net", then the URL that would be used to access the poster is: http://d77m7fxh64v63a.cloudfront.net/poster.jpg



For a walk-through on building a Roku channel using Instant TV Channel, please visit this link.

Comments or questions about this Roku, CloudFront & S3 developer tutorial can be emailed to .

Instant TV Channel is a cloud-based tool for Roku developers and content providers that shortens development time and eases maintenance after deployment.



Access Code: GRID3
Check out Instant TV Channel by adding our demonstration channel to your Roku player, or watch the YouTube video.

Need help with your Roku?

We are unable to provide technical support for your Roku device.

Please visit www.roku.com for assistance.



Instant TV Channel is not affiliated with nor endorsed by Roku Inc.