Infra Deployment
In this section, we will walk through the steps to set up and deploy YourCloud in your AWS cloud account.
Before we begin, ensure the following prerequisites are met:
-
Your AWS account has been whitelisted by Indee.
This is required to access Indee's container images and Lambda code.
-
The target region for deployment is supported by Indee.
At present, we support us-east-1, us-west-1, and ap-southeast-1.
Additional regions can be supported upon request.
-
You have received the latest CloudFormation templates from Indee.
-
AWS CLI is installed and configured with administrator permissions for the designated AWS account.
Finally, we recommend reviewing the infra components section to gain a better understanding.
Processing Stack
Requirements
-
An existing S3 bucket (We recommend hosting the bucket closer to your user base.) with the following bucket policy applied is required:
Make sure to replace the{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "*", "Resource": "arn:aws:s3:::<bucket-name>/*", "Condition": { "StringEquals": { "s3:DataAccessPointAccount": "<account-id>" } } } ] }
<bucket-name>
and<account-id>
placeholder with appropriate values. Checkout this link to know why this permission is recommended by AWS. -
Create a CloudWatch log group named
mediaprocessor/logs
in the region where you intend to host the processing stack.Do not modify the name of the log group name.
Make sure to replace the<region-name>
with your desired target region.
Steps
-
With the requirements in place, head to the CloudFormation console in your desired region.
Keeping the processing stack and S3 bucket in the same region helps avoid S3 data transfer charges. Otherwise, charges will apply as outlined in the AWS pricing table.
-
Choose the option to create a new stack using the
processing.yaml
template as shown below: -
Fill in the stack details, ensuring the stack name is unique for the region. Review the parameter descriptions carefully before continuing.
The
ApiKey
you provide here will be used to secure the API endpoints. You will need to include it as thex-api-key
header when interacting with the processing stack APIs.The provided
ApiKey
cannot be reused multiple times within the same region, and it must be at least 20 characters long. -
You may optionally add custom tags. At the end, acknowledge the additional capabilities required by CloudFormation.
-
Check the configurations and submit your request.
-
Wait for the stack creation to finish. Once done, review the stack's outputs section.
Streaming Global Stack
Requirements
-
Create a secret named
streaming/keys
in AWS Secrets Manager in theus-east-1
region, with replication to 12 regions that serve as CloudFront regional caches:Ensure that you replaceSECRET_ID=$(aws --region us-east-1 secretsmanager create-secret --name 'streaming/keys' --secret-string '{"enc_key_primary":"xxx","enc_key_secondary":"xxx","signing_key_primary":"yyy","signing_key_secondary":"yyy"}' --query 'ARN' --output text) && aws --region us-east-1 secretsmanager replicate-secret-to-regions --secret-id $SECRET_ID --add-replica-regions Region=ap-northeast-1 Region=ap-northeast-2 Region=ap-south-1 Region=ap-southeast-1 Region=ap-southeast-2 Region=eu-central-1 Region=eu-west-1 Region=eu-west-2 Region=sa-east-1 Region=us-east-2 Region=us-west-1 Region=us-west-2
xxx
andyyy
with a strong secret value.Do not modify the name of the secret. Your account should not contain any other secrets with the prefix
streaming/keys
.
Steps
-
With the requirements in place, head to the CloudFormation console in
us-east-1
region.The Streaming Global stack must be deployed in
us-east-1
. -
Choose the option to create a new stack using the
streaming-global.yaml
template. -
Fill in the stack details.
-
You may optionally add custom tags. At the end, acknowledge the additional capabilities required by CloudFormation.
-
Check the configurations and submit your request.
-
Wait for the stack creation to finish. Once done, review the stack's outputs section.
Streaming Regional Stack
Steps
-
Go to the CloudFormation console in the region where your S3 bucket is hosted.
The Streaming Regional stack must be deployed in the same region as your S3 bucket.
-
Choose the option to create a new stack using the
streaming-regional.yaml
template. -
Fill in the stack details.
-
You may optionally add custom tags. At the end, acknowledge the additional capabilities required by CloudFormation.
-
Check the configurations and submit your request.
-
Wait for the stack creation to finish. Once done, review the stack's outputs section.