Copyright (c) 2018 by Amazon.com, Inc. or its affiliates. Video on Demand on AWS is licensed under the terms of the Amazon Software License available at https://aws.amazon.com/asl/ Video on Demand on AWS AWS Implementation Guide Tom Nightingale April 2017 Last updated: March 2018 (see revisions)
22
Embed
Video on Demand on AWS - Amazon S3 · professionals who have practical experience with video-on-demand workflows and architecting on the AWS Cloud. Overview Amazon Web Services (AWS)
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Copyright (c) 2018 by Amazon.com, Inc. or its affiliates.
Video on Demand on AWS is licensed under the terms of the Amazon Software License available at
Amazon Web Services – Video on Demand on AWS March 2018
Page 7 of 22
Figure 2: Video on Demand error handling
Ingest Step Functions Video-Only Workflow When a new MP4, MPG, M4V, or MOV video is added to the source Amazon S3 bucket, a
Lambda function triggers the ingest workflow. During ingestion, source video details are
added to Amazon DynamoDB, the content is validated using MediaInfo, open-source
software that displays technical information about media files, and details are stored in
DynamoDB.
Important: Source video file extensions (.mp4, .mpg, .m4v or .mov) must be lowercase and file names cannot contain spaces.
Metadata and Video Workflow
When a new metadata file is added to the source Amazon S3 bucket, a Lambda function
triggers the ingest workflow. During ingestion, the metadata file, source video, and encoding
configuration details are added to Amazon DynamoDB, the source video is validated using
MediaInfo and details are stored in DynamoDB.
Important: You must upload the source video file to the Amazon S3 bucket before you upload the metadata file. Note that the upload must complete before you upload the metadata file.
Amazon Simple Notification Service (Amazon SNS) topics, and an Amazon CloudFront
distribution. You can also customize the template based on your specific needs.
Automated Deployment Before you launch the automated deployment, please review the architecture and other
considerations discussed in this guide. Follow the step-by-step instructions in this section to
configure and deploy the video-on-demand solution into your account.
Time to deploy: Approximately 25 minutes
Launch the Stack Use this AWS CloudFormation template to deploy the video-on-demand solution.
Note: You are responsible for the cost of the AWS services used while running this solution. See the Costs section for more details. For full details, see the pricing webpage for each AWS service you will be using in this solution.
1. Sign in to the AWS Management Console and click the button to
the right to launch the video-on-demand-media-convert
Amazon Web Services – Video on Demand on AWS March 2018
Page 10 of 22
You can also download the template as a starting point for your own implementation.
2. The template is launched in the US East (N. Virginia) Region by default. To launch the
solution in a different AWS Region, use the region selector in the console navigation bar.
Note: This solution uses AWS Step Functions and AWS Elemental MediaConvert, which are available in in specific AWS Regions only. Therefore, you must deploy this solution in a region that supports these services. For the most current service availability by region, see AWS service offerings by region.
3. On the Select Template page, verify that you selected the correct template and choose
Next.
4. Under Parameters, review the parameters for the template and modify them as
necessary. This solution uses the following default values.
Parameter Default Description
Admin Email <Requires input> A valid email address to receive Amazon SNS
notifications
Workflow Trigger <Requires input> Choose source video to ingest source videos only;
choose source metadata to ingest metadata files and
source videos
Archive Source
Content
false Choose true to enable an Amazon S3 lifecycle policy on
the source bucket to move applicable files to Amazon
Glacier after seven days
List of MP4 presets <Optional input> Comma delimited list of available MP4 presets. For example, 2160, 1080,720.
Note: Use this parameter only if you choose source video as your Workflow Trigger. If you leave this parameter blank, the solution will not create this output.
List of HLS presets <Optional input> Comma delimited list of available HLS presets. For example, 1080,720,540,360,270.
Note: Use this parameter only if you choose source video as your Workflow Trigger. If you leave this parameter blank, the solution will not create this output.
List of DASH
presets <Optional input> Comma delimited list of available DASH presets. For
example, 1080,720,540,360,270.
Note: Use this parameter only if you choose source video as your Workflow Trigger. If
Amazon Web Services – Video on Demand on AWS March 2018
Page 11 of 22
Parameter Default Description
you leave this parameter blank, the solution will not create this output.
Enable Frame
Capture
false Choose true to create thumbnails for each AWS
Elemental MediaConvert output
5. Choose Next.
6. On the Options page, choose Next.
7. On the Review page, review and confirm the settings. Be sure to check the box
acknowledging that the template will create AWS Identity and Access Management (IAM)
resources.
8. Choose Create to deploy the stack.
You can view the status of the stack in the AWS CloudFormation Console in the Status
column. You should see a status of CREATE_COMPLETE in roughly 25 minutes.
After the stack is created, Amazon SNS sends three subscription notifications to the
admin email address with links to enable encoding, publishing, and error notifications.
9. In the subscription notification emails, select each link to enable SNS notifications.
Note: In addition to the AWS Lambda functions that create solution resources and manage the ingest and publishing processes, this solution includes the metrics-
helper Lambda function, which runs only during initial configuration or when resources are updated or deleted.
When running this solution, the metrics-helper function is inactive. However, do not delete the function as it is necessary to manage associated resources.
Security When you build systems on AWS infrastructure, security responsibilities are shared between
you and AWS. This shared model can reduce your operational burden as AWS operates,
manages, and controls the components from the host operating system and virtualization
layer down to the physical security of the facilities in which the services operate. For more
information about security on AWS, visit the AWS Security Center.
Amazon S3 Bucket Policy The Amazon Simple Storage Service (Amazon S3) buckets for your source video and MP4
output are configured with default access policies. To access these buckets, users must have
AWS Identity and Access Management (IAM) roles with admin privileges. The Amazon S3
buckets, AWS Step Functions, an Amazon Elastic Transcoder, an Amazon DynamoDB table,
Amazon CloudWatch Logs, Amazon Simple Notification Service (Amazon SNS) topics, and
an Amazon CloudFront distribution. You can also customize the template based on your
specific needs.
Automated Deployment Before you launch the automated deployment, please review the architecture and other
considerations discussed in this guide. Follow the step-by-step instructions in this section to
configure and deploy the video-on-demand solution into your account.
Time to deploy: Approximately 25 minutes
Launch the Stack Use this AWS CloudFormation template to deploy the video-on-demand solution with
Amazon Elastic Transcoder.
Note: You are responsible for the cost of the AWS services used while running this solution. See the Costs section for more details. For full details, see the pricing webpage for each AWS service you will be using in this solution.
Amazon Web Services – Video on Demand on AWS March 2018
Page 18 of 22
1. Sign in to the AWS Management Console and click the button to
the right to launch the video-on-demand-elastic-
transcoder AWS CloudFormation template.
You can also download the template as a starting point for your
own implementation.
2. The template is launched in the US East (N. Virginia) Region by default. To launch the
solution in a different AWS Region, use the region selector in the console navigation bar.
Note: This solution uses AWS Step Functions and Amazon Elastic Transcoder, which are available in in specific AWS Regions only. Therefore, you must deploy this solution in a region that supports these services. For the most current service availability by region, see AWS service offerings by region.
3. On the Select Template page, verify that you selected the correct template and choose
Next.
4. Under Parameters, review the parameters for the template and modify them as
necessary. This solution uses the following default values.
Parameter Default Description
Admin Email <Requires input> A valid email address to receive Amazon SNS
notifications
Workflow Trigger <Requires input> Choose source video to ingest source videos only;
choose source metadata to ingest metadata files and
source videos
Archive Source
Content
false Choose true to enable an Amazon S3 lifecycle policy on
the source bucket to move applicable files to Amazon
Glacier after seven days
List of MP4 presets <Optional input> Comma delimited list of available MP4 presets. For example, 1080,720.
Note: Use this parameter only if you choose source video as your Workflow Trigger. If you leave this parameter blank, the solution will not create this output.
List of HLS presets <Optional input> Comma delimited list of available HLS presets. For example, 1080,720,540,360,270.
Note: Use this parameter only if you choose source video as your Workflow Trigger. If you leave this parameter blank, the solution will not create this output.
Amazon Web Services – Video on Demand on AWS March 2018
Page 19 of 22
Parameter Default Description
List of DASH
presets <Optional input> Comma delimited list of available DASH presets. For
example, 1080,720,540,360,270.
Note: Use this parameter only if you choose source video as your Workflow Trigger. If you leave this parameter blank, the solution will not create this output.
Enable Frame
Capture
false Choose true to create thumbnails for each AWS
Elemental MediaConvert output
Image Overlay aws-logo.png Name of the image (PNG or JPEG) to use as your
watermark
Note: After you launch the stack, you must upload your watermark image to the image-
overlay folder in the source Amazon S3 bucket.
5. Choose Next.
6. On the Options page, choose Next.
7. On the Review page, review and confirm the settings. Be sure to check the box
acknowledging that the template will create AWS Identity and Access Management (IAM)
resources.
8. Choose Create to deploy the stack.
You can view the status of the stack in the AWS CloudFormation Console in the Status
column. You should see a status of CREATE_COMPLETE in roughly 25 minutes.
After the stack is created, Amazon SNS sends three subscription notifications to the
admin email address with links to enable encoding, publishing, and error notifications.
9. In the subscription notification emails, select each link to enable SNS notifications.
Note: In addition to the AWS Lambda functions that create solution resources and manage the ingest and publishing processes, this solution includes the metrics-helper Lambda function, which runs only during initial configuration or when
resources are updated or deleted.
When running this solution, the metrics-helper function is inactive. However, do
not delete the function as it is necessary to manage associated resources.
Amazon Web Services – Video on Demand on AWS March 2018
Page 20 of 22
Appendix F: Collection of Anonymous Data This solution includes an option to send anonymous usage data to AWS. We use this data to
better understand how customers use this solution and related services and products. When
enabled, the following information is collected and sent to AWS each time a video is
processed:
• Solution ID: The AWS solution identifier
• Unique ID (UUID): Randomly generated, unique identifier for each Video on
Demand on AWS deployment
• Timestamp: Data-collection timestamp
• Use Glacier: Whether Amazon Glacier is used
• Workflow Trigger: The workflow trigger selected
• Frame Capture: Whether thumbnails are created for AWS Elemental MediaConvert
output
• Video Data: The output formats and presets used for each video
Example data:
“HLS”: “1080,720,540,360,270”
Note that AWS will own the data gathered via this survey. Data collection will be subject
to the AWS Privacy Policy. To opt out of this feature, modify the AWS CloudFormation