Switching Avalon to use MediaConvert from ElasticTranscoder
Requirements
AWS account with sufficient privileges to create roles, policies, and use mediaconvert.
Description
Amazon ElasticTranscoder will be EOL and no longer usable on Nov 13, 2025. AWS Elemental MediaConvert is the replacement service offered by AWS. Avalon 8.2 will contain support for MediaConvert and default to it for Terraform installs, but given ElasticTranscoder’s timeline a manual upgrade will be necessary to avoid gaps in transcoding capability.
Upgrade Steps
For Terraform Installations
Apply patch to avalon in
Add support for AWS Elemental MediaConvert active_encode adapter by cjcolvar · Pull Request #6579 · avalonmediasystem/avalon and get the preset files from
Add missing media convert presets by cjcolvar · Pull Request #6645 · avalonmediasystem/avalonUpdate avalon-terraform to the latest code
Set
encoding_engine_adapter = "media_convert"interraform.tfvarsRun
terraform applyAfter Avalon has been built and deployed test ingesting a new file and check that it plays back
Look in the AWS Console for MediaConvert and check that the job appears
For Non-Terraform Installations (or Terraform installations that cannot upgrade to the latest avalon-terraform)
Apply patch to avalon in
Add support for AWS Elemental MediaConvert active_encode adapter by cjcolvar · Pull Request #6579 · avalonmediasystem/avalon and get the preset files from
Add missing media convert presets by cjcolvar · Pull Request #6645 · avalonmediasystem/avalonCreate IAM role for mediaconvert (adjust role name as desired) and make note of the role’s ARN
Using the CLI:aws iam create-role --role-name avalon-mediaconvert-role --assume-role-policy-document '{"Version": "2008-10-17", "Statement": [{"Action": "sts:AssumeRole", "Effect": "Allow", "Sid": "", "Principal": {"Service": "mediaconvert.amazonaws.com"}}]}'Using the AWS Console:
Go to IAM → Roles → Create Role
Fill in the form for step 1:
Trusted Entity Type: AWS Service
Use Case: MediaConvertSkip step 2
Fill in the form for step 3 and create the role:
Role name: avalon-mediaconvert-role
Create policy for mediaconvert role using masterfiles and derivatives bucket ARNs and make note of the policy’s ARN
Using the CLI:aws iam create-policy --policy-name avalon-mediaconvert-policy --policy-document '{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:List*", "s3:Get*" ], "Resource": ["<masterfiles-bucket-arn>", "<masterfiles-bucket-arn>/*"] }, { "Effect": "Allow", "Action": [ "s3:Put*" ], "Resource": ["<derivatives-bucket-arn>", "<derivatives-bucket-arn>/*"] } ] }'Using the AWS Console:
Go to IAM → Policies → Create Policy
Switch the Policy Editor to JSON and paste in the following:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:List*", "s3:Get*" ], "Resource": ["<masterfiles-bucket-arn>", "<masterfiles-bucket-arn>/*"] }, { "Effect": "Allow", "Action": [ "s3:Put*" ], "Resource": ["<derivatives-bucket-arn>", "<derivatives-bucket-arn>/*"] } ] }Fill in the form for step 2 and create policy:
Policy name: avalon-mediaconvert-policy
Attach policy to role using the policy’s ARN
Using CLI:aws iam attach-role-policy --role-name avalon-mediaconvert-role --policy-arn <avalon-mediaconvert-policy-arn>Using AWS Console:
Go to IAM → Roles → avalon-mediaconvert-role
Under Permission Policies click the Add Permissions drop down and select Attach Policies
Find and select the avalon-mediaconvert-policy and click Add Permissions
(If avalon-terraform installation) Update <namespace>-<appname>-compose-api-access policy using mediaconvert role ARN:
Using AWS CLI:aws iam create-policy-version --policy-arn <compose-api-access-policy-arn> --set-as-default --policy-document '{ "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Action": [ "ssm:Get*", "ses:SendRawEmail", "ses:SendEmail", "s3:*", "logs:PutRetentionPolicy", "logs:PutLogEvents", "logs:DescribeLogStreams", "logs:DescribeLogGroups", "logs:CreateLogStream", "logs:CreateLogGroup", "elastictranscoder:ReadPreset", "elastictranscoder:ReadJob", "elastictranscoder:Read*", "elastictranscoder:ListPresets", "elastictranscoder:List*", "elastictranscoder:CreatePreset", "elastictranscoder:CreateJob", "elastictranscoder:CancelJob", "mediaconvert:*", "elasticfilesystem:*", "ec2:DescribeInstances", "cloudwatch:PutMetricData" ], "Resource": "*" }, { "Effect": "Allow", "Action": "iam:PassRole", "Resource": <mediaconvert-role-arn> } ] }'Using AWS Console:
Go to IAM → Policies → <namespace>-<appname>-compose-api-access
Edit as JSON:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Action": [ "ssm:Get*", "ses:SendRawEmail", "ses:SendEmail", "s3:*", "logs:PutRetentionPolicy", "logs:PutLogEvents", "logs:DescribeLogStreams", "logs:DescribeLogGroups", "logs:CreateLogStream", "logs:CreateLogGroup", "elastictranscoder:ReadPreset", "elastictranscoder:ReadJob", "elastictranscoder:Read*", "elastictranscoder:ListPresets", "elastictranscoder:List*", "elastictranscoder:CreatePreset", "elastictranscoder:CreateJob", "elastictranscoder:CancelJob", "mediaconvert:*", "elasticfilesystem:*", "ec2:DescribeInstances", "cloudwatch:PutMetricData" ], "Resource": "*" }, { "Effect": "Allow", "Action": "iam:PassRole", "Resource": <mediaconvert-role-arn> } ] }Save Changes
Update Avalon Settings or ENV variables in settings.yml or .env:
SETTINGS__ENCODING__ENGINE_ADAPTER="media_convert" SETTINGS__ENCODING__MEDIA_CONVERT_ROLE=<avalon-mediaconvert-role-arn> SETTINGS__ENCODING__DERIVATIVE_BUCKET=<derivative-bucket-name> SETTINGS__ENCODING__PRESETS_PATH=config/media_convert_presets/(If avalon-terraform installation) Run CodeBuild build to create and deploy a new avalon container image
After Avalon has been deployed test ingesting a new file and check that it plays back
Look in the AWS Console for MediaConvert and check that the job appears