-
Notifications
You must be signed in to change notification settings - Fork 58
AWS MediaLive Cloudformation Fn::GetAtt get array value #23
Comments
Hi, |
Thanks for the response @morjoan I have tried using the MediaPackageSettings and REF the mediachannel
But this then give you errors about output groups.
I can get the template to run by inserting dummy settings like this.
Here is the full template that will complete. https://gist.github.com/samueleastdev/926a0bfbe7b8af193643ddda2ac9cd73 But obviously it is not connected to the mediapackage channel. Do you know how to get the full code for this template? https://docs.aws.amazon.com/solutions/latest/live-streaming/template.html to understand it and make updates to it in Lambda etc. Thanks |
For MediaPackageSettings, the ChannelId should be the Id of the MediaPackage channel you created -- in your example that is "MediaPackage2021", not MediaPackageChannel. Using REF won't give you the Id but instead the MediaPackage ARN (see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediapackage-channel.html). At any rate, you'll find the source code for that template here: https://docs.aws.amazon.com/solutions/latest/live-streaming/source-code.html Good luck! |
Hi @morjoan Thanks I have tried that before pretty much tried every combination I could possible think of changing the id just gives this error.
I have tried removing the Id.
And it says its required.
Even tho it says it is not required in the documentation.
Thought it maybe related to my EncoderSettings
In my hls OutputGroups no luck. You would think that adding the "ChannelId" : "MediaPackage2021" would be the right way to go unfortunately not. Thanks |
@samueleastdev ran into the same error message. For me, the issue wasn't in the {
"ChannelClass": "SINGLE_PIPELINE",
"Destinations": [
{
"Id": "some-id",
"MediaPackageSettings": [
{
"ChannelId": "media-package-channel-id"
}
]
}
],
"EncoderSettings": {
"OutputGroups": [
{
"Name": "some-name",
"OutputGroupSettings": {
"HlsGroupSettings": {
...
}
},
"Outputs": [
{
"OutputName": "_some-name",
"OutputSettings": {
"HlsOutputSettings": {
...
}
}
}
]
}
]
},
"InputAttachments": [...],
"InputSpecification": {...},
"Name": "some-name",
"RoleArn": "some-role",
"Tags": {}
} While I should've used {
"ChannelClass": "SINGLE_PIPELINE",
"Destinations": [
{
"Id": "some-id",
"MediaPackageSettings": [
{
"ChannelId": "media-package-channel-id"
}
]
}
],
"EncoderSettings": {
"OutputGroups": [
{
"Name": "some-name",
"OutputGroupSettings": {
"MediaPackageGroupSettings": {
"Destination": {
"DestinationRefId": "media-package-channel-id"
}
}
},
"Outputs": [
{
"OutputName": "_some-name",
"OutputSettings": {
"MediaPackageOutputSettings": {}
}
}
]
}
]
},
"InputAttachments": [...],
"InputSpecification": {...},
"Name": "some-name",
"RoleArn": "some-role",
"Tags": {}
} |
Hi, |
Hi @morjoan & @richardcornelissen Thanks for the extra information I can now get somewhere with the following template I am trying to use RTMP push.
It completes but there seems to be errors pushing to the MediaPackage channel hls endpoint that I cannot figure out. I get the following errors.
So it must be some permissions issue. When using OBS software it makes the connection to the input. Server: rtmp://54.000.000.243:1935/app Any suggestions on where I might be going wrong? |
I am building a Cloudformation template for Media Live I have everything working with the AWS PHP SDK. I create a MediaPackage channel and return the data to be used in the next call.
Return example.
I can then use these values in PHP like this.
And use these when creating the media live channel.
Which works but with Cloudformation you have to use the Fn::GetAtt like this.
You cannot go into the array with Fn::GetAtt is there another function that can be used in combination with the Fn::GetAtt to get the inner values.
Something along these lines
Here is my full template its hard to explain but basically I need to attach my medialive channel to the mediapackage channel as I mention I have done with the php code above Cloudformation doesn't make this easy.
You will see the Destinations section line 39 I need to populate the Url, Username, PasswordParam with the returned values from the mediapackage channel creation.
https://gist.github.com/samueleastdev/03b050f937855a81f36bb1e3260aa5d3
I started with this template https://docs.aws.amazon.com/solutions/latest/live-streaming/template.html and I am trying to do it myself they use custom lambda functions within the template so maybe it is not possible without lambda.
Any suggestions or help.
The text was updated successfully, but these errors were encountered: