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:
Log into your AWS (Amazon Web Services) account and
go to the S3 section of your AWS control panel.
Click the Create Bucket button.
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 "+")
The bucket Region should be set to "US East (N. Virginia)".
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:
Log into your AWS (Amazon Web Services) account and
go to the CloudFront section of your AWS control panel.
From the left-hand Navigation panel, click Distributions.
Click the Create Distribution button.
Under Origin domain,
click in the Choose origin domain box,
and select the S3 bucket previously created to use as the origin server
for this CloudFront distribution.
Under Origin access,
select Legacy access identities.
Under Origin access,
locate the Origin access identity setting and select "Create new OAI", then click "Create".
Under Origin access,
locate the Bucket policy setting
and select "Yes, update the bucket policy".
Under Web Application Firewall (WAF),
select "Do not enable security protections".
In the Description box,
enter a comment to identify this CloudFront Distribution,
for example "My 1st CloudFront Distribution".
Click the Create Distribution button.
From the left-hand Navigation panel, click Distribution again.
Click the row containing the Distribution that you just created.
Record the Distribution 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.
Wait for "Deploying" under the Last Modified column to change to today's date.
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
Instant TV Channel is a cloud-based tool for Roku developers and content providers that shortens development time and eases maintenance after deployment.