

# Plan your deployment
<a name="plan-your-deployment"></a>

 This section describes the [cost](cost.md), [security](security-1.md), [Regions](#supported-aws-regions), and other considerations prior to deploying the solution. 

# Cost
<a name="cost"></a>

 You are responsible for the cost of the AWS services used while running this solution. The total cost for running this solution depends on the size of your videos, the number of outputs created, and the number of views the published content receives through CloudFront. After encoding all of your videos with this solution, the monthly cost will be for Amazon S3 storage, and any CloudFront costs from streaming your new video content to users. 

 As of this revision, the estimated cost of running this solution for a 60-minute video with the dimensions listed in the following table, in the US East (N. Virginia) Region, is approximately **\$1232.86 per month per job**. 

 We recommend creating a [budget](https://docs.aws.amazon.com/cost-management/latest/userguide/budgets-create.html)  through [AWS Cost Explorer](https://aws.amazon.com/aws-cost-management/aws-cost-explorer/) to help manage costs. Prices are subject to change. For full details, see the pricing webpage for each [AWS service used in this solution](architecture-details.md#aws-services-in-this-solution). 

## Cost table for a 60-minute source video
<a name="cost-table-for-a-60-minute-source-video"></a>

 The following table provides a sample cost breakdown for processing a 60-minute source video using the solution deployed with the default parameters in the US East (N. Virginia) Region. 


|  AWS service  |  Dimensions  |  Cost [USD]  | 
| --- | --- | --- | 
|  Amazon CloudFront  |   Using the price of \$10.085 per GB for CloudFront, a 60-minute video with the default job settings streamed to 1,000 users would cost approximately:   *0.75 MB/s × 1000 users × 3600 seconds = 2700 GB/hour*   *2700 GB/hour × \$10.085 per GB = \$1229.50 an hour*   |  \$1229.50  | 
|  Amazon S3  |   A 60-minute video uses a maximum of 9 GB of storage on Amazon S3, depending on the complexity of the video content.   *\$10.023 per GB × 9 GB = \$10.207*   Source videos uploaded to Amazon S3 add to this cost. After MediaConvert processing, delete source content from Amazon S3 to reduce storage costs.   |  \$10.207  | 
|  AWS Lambda  |   4 Lambda requests per file using \$10.20 per million requests   *\$10.0000002 × 4 requests = \$10.0000008*   |  \$10.0000008  | 
|  Amazon CloudWatch  |  [AWS Free Tier](https://aws.amazon.com/free/). [See Amazon CloudWatch Pricing](https://aws.amazon.com/cloudwatch/pricing/) for more information.  |  \$10.00  | 
| Amazon EventBridge |  [AWS Free Tier](https://aws.amazon.com/free/). [See Amazon EventBridge Pricing](https://aws.amazon.com/eventbridge/pricing/) for more information.  |  \$10.00  | 
|  Amazon SNS  |  [AWS Free Tier](https://aws.amazon.com/free/). See [Amazon SNS Pricing](https://aws.amazon.com/sns/pricing/) for more information.  |  \$10.00  | 
|  AWS Elemental MediaConvert  |   HLS output profile:  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/solutions/latest/video-on-demand-on-aws-foundation/cost.html)  |  \$13.15  | 
|  Total:  |  \$1232.86  | 

## MediaConvert cost
<a name="mediaconvert-cost"></a>

 A significant cost of running this solution comes from MediaConvert. This section breaks down the MediaConvert costs for the sample 60-minute source video. 

 The video outputs in the [Cost table for a 60-minute source video](#cost-table-for-a-60-minute-source-video) use the following Basic tier MediaConvert settings: 
+  AVC codec 
+  1 pass quality 
+  30 fps 

 This solution's CloudFormation template creates a destination S3 bucket where the processed videos are stored. The solution stores each processed result in a folder with the same name as the process ID. Pricing increases when using higher frame rates than 30 fps. For more information about MediaConvert pricing, refer to [AWS Elemental MediaConvert Pricing](https://aws.amazon.com/mediaconvert/pricing/). 

# Security
<a name="security-1"></a>

 When you build systems on AWS infrastructure, security responsibilities are shared between you and AWS. This [shared responsibility model](https://aws.amazon.com/compliance/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](https://aws.amazon.com/security/). 

## Amazon S3 bucket policy
<a name="amazon-s3-bucket-policy"></a>

 The S3 buckets for MediaConvert output include a policy that allows access from CloudFront. Because the CloudFront endpoints are publicly accessible, the MediaConvert output bucket is also publicly accessible when accessed with CloudFront. For information on how to secure Amazon CloudFront, refer to [Serving private content with signed URLs and signed cookies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html) in the *Amazon CloudFront Developer Guide*. 

## IAM roles
<a name="iam-roles"></a>

 IAM roles allow you to assign granular access policies and permissions to services and users on the AWS Cloud. This solution creates several IAM roles, including a role that grants MediaConvert access to Amazon S3. This role is necessary to allow the services to operate in your account. 

## Supported AWS Regions
<a name="supported-aws-regions"></a>

 This solution uses the MediaConvert 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](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/). 

 This solution is available in the following AWS Regions: 


|  Region name  | 
| --- | 
|  US East (Ohio)  |  Asia Pacific (Sydney)  | 
|  US East (N. Virginia)  |  Asia Pacific (Tokyo)  | 
|  US West (N. California)  |  Canada (Central)  | 
|  US West (Oregon)  |  Europe (Frankfurt)  | 
|  Africa (Cape Town)  |  Europe (Ireland)  | 
|  Asia Pacific (Melbourne)  |  Europe (London)  | 
|  Asia Pacific (Mumbai)  |  Europe (Paris)  | 
|  Asia Pacific (Osaka)  |  Europe (Stockholm)  | 
|  Asia Pacific (Seoul)  |  South America (São Paulo)  | 
|  Asia Pacific (Singapore)  |  AWS GovCloud (US-West)  | 

 

# Customization
<a name="customization"></a>

 This solution uses a serverless architecture that you can update and extend for your specific video processing needs. For example, you can add or replace Amazon SNS with [Amazon Simple Queue Service](https://aws.amazon.com/sqs/) (Amazon SQS) to allow upstream workflows to subscribe and get notifications on the workflow outputs. You can also add multiple folders and job settings files in the source S3 bucket to accommodate different use cases. For details, refer to [Working with mulitple job settings files](job-settings-file.md#working-with-multiple-job-settings-files). 

# Quotas
<a name="quotas"></a>

 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 solution
<a name="quotas-for-aws-services-in-this-solution"></a>

 Make sure you have sufficient quota for each of the [services implemented in this solution](architecture-details.md#aws-services-in-this-solution). For more information, see [AWS service quotas](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). 

 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](https://docs.aws.amazon.com/general/latest/gr/aws-general.pdf#aws-service-information) page in the PDF instead. 

## AWS CloudFormation quotas
<a name="aws-cloudformation-quotas"></a>

 Your AWS account has AWS CloudFormation quotas that you should be aware of when [launching the stack](launch-the-stack.md) in this solution. By understanding these quotas, you can avoid limitation errors that would prevent you from deploying this solution successfully. For more information, see [AWS CloudFormation quotas](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html) in the in the *AWS CloudFormation User's Guide*. 

## AWS Elemental MediaConvert quotas
<a name="aws-elemental-mediaconvert-quotas"></a>

 All MediaConvert jobs run in a queue. If you don't specify a queue when you create your job, MediaConvert sends it to the default on-demand queue. For information about how many queues you can create and how many jobs those queues can run, refer to [How queues work in AWS Elemental MediaConvert](https://docs.aws.amazon.com/mediaconvert/latest/ug/working-with-queues.html) in the *MediaConvert User Guide* and see [Service quotas](https://docs.aws.amazon.com/general/latest/gr/mediaconvert.html#limits_mediaconvert) in the *AWS General Reference Guide*. 