

# Deploy the solution
Deploy the solution

 This solution uses [AWS CloudFormation templates and stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-concepts.html) to automate its deployment. The CloudFormation template specifies the AWS resources included in this solution and their properties. The CloudFormation stack provisions the resources that are described in the template. 

## Deployment process overview
Deployment process overview

 Follow the step-by-step instructions in this section to configure and deploy the solution into your account. 

 Before you launch the solution, review the [cost](cost.md), [architecture](architecture-overview.md), [network security](security-1.md), and other considerations discussed earlier in this guide. 

 **Time to deploy:** Approximately 25 minutes 

 [Step 1: Launch the Stack](step-1-launch-the-stack.md) 
+  Launch the AWS CloudFormation template into your AWS account. 
+  Enter values for required parameters. 
+  Review the other template parameters, and adjust if necessary. 

 [Step 2: Upload a video or image file](step-2-upload-a-video-or-image-file) 
+  Upload a file using the web interface to begin the ingestion and analysis workflows. 

 [Step 3: Create your face collection](step-3-create-your-face-collection) 
+  Index faces to create your face collection to improve face analysis results. 

 [Step 4: Advanced search](step-4-advanced-search.md) 
+  Find the specific moment you are looking for. 

 [Step 5: Customizing AI/ML settings](step-5-customizing-aiml-settings.md) 
+  Configure the AI/ML services that you want to use in your analysis. 

 [Step 6: Viewing statistics](step-6-viewing-statistics.md) 
+  A summary of all content in your collection. 

**Important**  
 This solution includes an option to send anonymized operational metrics to AWS. We use this data to better understand how customers use this solution and related services and products. AWS owns the data gathered though this survey. Data collection is subject to the [AWS Privacy Notice](https://aws.amazon.com/privacy/).   
 To opt out of this feature, download the template, modify the AWS CloudFormation mapping section, and then use the AWS CloudFormation console to upload your updated template and deploy the solution. For more information, see the [Anonymized data collection](reference.md#anonymized-data-collection) section of this guide. 

# AWS CloudFormation template
AWS CloudFormation template

 You can download the CloudFormation template for this solution before deploying it. 

 [https://solutions-reference.s3.amazonaws.com/media2cloud/latest/media2cloud.template](https://solutions-reference.s3.amazonaws.com/media2cloud/latest/media2cloud.template) **media2cloud.template** - Use this template to launch the solution and all associated components. The default configuration deploys the core and supporting services found in the [AWS services in this solution](aws-services-in-this-solution.md) section, but you can customize the template to meet your specific needs. 

**Note**  
 If you have previously deployed this solution, see [Update the solution](update-the-solution.md) for update instructions. 

# Step 1: Launch the stack
Step 1: Launch the stack

 Follow the step-by-step instructions in this section to configure and deploy the solution into your account. 

 **Time to deploy:** Approximately 25 minutes 

1.  Sign in to the [AWS Management Console](https://aws.amazon.com/console/) and select the button to launch the media2cloud AWS CloudFormation template. [https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?templateURL=https:%2F%2Fsolutions-reference.s3.amazonaws.com%2Fmedia2cloud%2Flatest%2Fmedia2cloud.template&redirectId=ImplementationGuide](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?templateURL=https:%2F%2Fsolutions-reference.s3.amazonaws.com%2Fmedia2cloud%2Flatest%2Fmedia2cloud.template&redirectId=ImplementationGuide) 

1.  The template launches 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. 

1.  On the **Create stack** page, verify that the correct template URL is in the **Amazon S3 URL** text box and choose **Next**. 

1.  On the **Specify stack details** page, assign a name to your solution stack. For information about naming character limitations, see [IAM and AWS STS quotas, name requirements, and character limits](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html) in the *AWS Identity and Access Management User Guide*. 

1.  Under **Parameters**, review the parameters for this solution template and modify them as necessary. This solution uses the following default values.     
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/solutions/latest/media2cloud-on-aws/step-1-launch-the-stack.html)

1.  Select **Next**. 

1.  On the **Configure stack options** page, choose **Next.** 

1.  On the **Review and create** page, review and confirm the settings. Select the box acknowledging that the template will create AWS Identity and Access Management (IAM) resources. 

1.  Choose **Submit** to deploy the stack. 

    You can view the status of the stack in the AWS CloudFormation console in the **Status** column. You should receive a CREATE\$1COMPLETE status in approximately 25 minutes. 

# Step 2: Upload a video or image file
Step 2: Upload a video or image file

 After the solution successfully launches, you can start uploading video or image files for processing. The solution sends two emails: one with the subscription confirmation for the Amazon SNS topic to send ingestion, analysis, labeling, and error notifications, and one with instructions for signing into the solution's provided web interface. 

1.  In the **M2CStatus** email, select **Confirm subscription** to subscribe to the Amazon SNS topic. 

1. In the second email, follow the instructions to sign in to the website. You will be prompted to change the password the first time you sign in.

1.  Choose **Sign in** on the upper right corner of the page and sign in using your recently created password. 

1.  Navigate to the **Upload** tab. 

1.  Drag and drop your files to the **Upload Video** box, or choose the **Browse Files** button to upload a video or image file. Once the files are uploaded, choose **Quick upload**, or select **Next** to **Start Upload**. 

    Once the ingestion process is completed, a thumbnail image of the video or image is created. You can hover over the thumbnail image and select **Play now** to view the media file. 

# Step 3: Create your face collection
Step 3: Create your face collection

 The web interface allows you to create your own Amazon Rekognition face collection and index and store faces in the collection to improve the analysis results. 

1.  In the web interface select **FaceCollection** in the top navigation. 

1.  Type in the name of the face collection in the blank field and choose **Create New Collection.** 

1.  In the web interface, hover over a created video or image and choose **Play**. 

1.  Choose the **Play** button again and then choose **Pause** once you find a face in the content. 

1.  Move the toggle by **Snapshot Mode** to the right to display a bounding box. 

1.  Adjust the size of the bounding to fit tightly over the face. 

1.  Type the name of the person in the **Name** box and select your **Face Collection** from the dropdown menu. 

1.  Once finished, choose the **Index Face** button**.** 

1.  Repeat steps 4-8 until you have identified all of the faces. 

1.  After the faces are indexed, choose **Re-analyze** to analyze the video or image using the newly indexed faces in your face collection so that all unidentified faces are recognized and indexed. 

# Step 4: Advanced search
Step 4: Advanced search

 Included in the web interface is the ability to search for specific moments across the analyzed content. A user has the ability to put in specific search terms and have timestamped results returned. 

1.  In the web interface select **Collection** in the top navigation bar. 

1.  On the collection page, there is a search bar in the top right-hand corner of the page. Deselect any of the attributes that you want excluded from your search and then type a term or phrase in the **Search** box and hit submit. 

1.  Assets matching the search term will be presented under the **Search Results** section of the page and highlight where there was a match to your search term. 

1.  Choose the file thumbnail in the search results to be taken to that asset. 

# Step 5: Customizing AI/ML settings
Step 5: Customizing AI/ML settings

 In this version of Media2Cloud on AWS, users have a lot of flexibility on the AI/ML services that are used. They also have the ability to configure those services for their use cases. 

1.  In the web interface select **Settings** from the top navigation bar. 

1.  In the **Amazon Rekognition Settings** section: 
   +  You can set the minimum confidence level that you want results from. 
   +  Toggle on or off specific detection types. 
   +  Select the face collection that you want to use when analyzing assets. 
   +  When using Amazon Rekognition to detect text on screen, you can select the specific regions of the screen for analysis. 
   +  If you have created a custom AI/ML model using Amazon Rekognition Custom Labels, you can use that model when analyzing assets. 
   +  The **Frame Based Analysis** section give the flexibility to switch from the Amazon Rekognition Video API to the Amazon Rekognition Image API. When you toggle the **Frame Based Analysis** button on, you can determine the frequency that frames are analyzed. 

1.  In the **Amazon Transcribe** settings section: 
   +  Select the language that you want Amazon Transcribe to create a transcript of the video in. For a complete list of supported languages, refer to [Amazon Transcribe Supported Languages](https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html#table-language-matrix). 
   +  If you have created a **Custom Vocabulary** to improve the accuracy of Amazon Transcribe, you can select that model for the analysis of your assets. 
   +  If you have created a **Custom Language Model** you can activate that model for the analysis of your assets. 

1.  In the **Amazon Comprehend** settings section: 
   +  Activate **Entity Detection, Sentiment Analysis,** and **Key phrase Detection**. 
   +  If you have built a **Custom Entity Recognizer** to identify custom entities for your business needs, you can activate that as well. 

1.  In the **Amazon Textract** settings section, you can activate the service to extract text from documents that you are analyzing. 

# Step 6: Viewing statistics
Step 6: Viewing statistics

 Once content has been analyzed, the web interface has a way to show an aggregation of the metadata generated by the AI/ML Services. This helps to answer the question of what the most popular or frequent tags and detections are in the library. 

1.  In the web interface select **Stats** from the top navigation bar. 

1.  Pie charts show the overall and categorized statistics of your content collection. 