amazon-web-servicesamazon-cloudfrontcdnaws-elementalaws-media-live

How to link AWS CloudFront distribution to AWS Elemental MediaPackage from PHP SDK


I want to link CloudFront from MediaPackage, This is possible from AWS Elemental MediaPackage console but I need to do this from my coding I use PHP.

I don't see an option from CreateChannel function to quick enable as it was on console.

enter image description here enter image description here

https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-mediapackage-2017-10-12.html#createchannel

Do I need to create from CloudFront SDK and configure all option?

This is how my auto-generated CloudFront from my Elemental MediaPackage console looks.

enter image description here enter image description here enter image description here enter image description here enter image description here

need help.


Solution

  • I noticed the same thing when looking through the PHP SDK MediaPackage documentation. It looks like what you will need to do is use SDK's CloudFront client to create the CloudFront distribution after creating the MediaPackage channel and endpoint. There are instructions on this page for doing this. The instructions are under the heading "Creating a Distribution from Amazon CloudFront."

    https://docs.aws.amazon.com/mediapackage/latest/ug/cdns-cf.html#cdns-create-cf