CloudFormation return values for MediaLive Inputs

0

I have a CFn template that deploys a MediaLive pipeline that gets used by internal people that don't know a lot about the AWS Elemental Media Services. I would like to have the people that deploy this template refer to the Outputs of the CloudFormation template to determine the MediaLive Input destination that they need to push RTMP content to. Documentation (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-medialive-input.html#aws-resource-medialive-input-return-values) says that the "Destinations" return value should do what I need.

Consider the following CFn:

Outputs:
   MediaLiveInputDestination:
     Value: !GetAtt <Resource>.Destinations

The template errors when being deployed, stating "Template format error: Every Value member must be a string.". I presume that an array is being passed back to CFn, which means that I have to specify a sub-value under Destinations - but there is no documentation that I can find to determine what sub-values are returned (I've tried the obvious candidates of ".A" and ".0" to no avail).

Any suggestions?

질문됨 4년 전449회 조회
1개 답변
0
수락된 답변

I just tested this and it works. Can you try it out?

AWSTemplateFormatVersion: 2010-09-09
Parameters:
  Stream1:
    Description: StreamName1
    Type: String
    Default: test/test1
  Stream2:
    Description: StreamName2
    Type: String
    Default: test/test2
Metadata:
  'AWS::CloudFormation::Designer':
    0c5c0850-c9e8-4019-97b0-d950aaf22611:
      size:
        width: 60
        height: 60
      position:
        x: 151
        'y': 145
      z: 0
Resources:
  MLI5AM0O:
    Type: 'AWS::MediaLive::Input'
    Properties:
      Type: RTMP_PUSH
      Name: Testing12345
      InputSecurityGroups:
        - 2461108
      Destinations:
        - StreamName: !Ref Stream1
        - StreamName: !Ref Stream2
    Metadata:
      'AWS::CloudFormation::Designer':
        id: 0c5c0850-c9e8-4019-97b0-d950aaf22611
Outputs:
  StreamingPrimaryURL:
    Description: Primary Ingest
    Value: !Select [ 0, !GetAtt MLI5AM0O.Destinations]
    
  StreamingSecondaryURL:
    Description: Secondary Ingest
    Value: !Select [ 1, !GetAtt MLI5AM0O.Destinations]
KeyValueDescriptionExport name
StreamingPrimaryURLrtmp://52.201.128.200:1935/test/test1Primary Ingest-
StreamingSecondaryURLrtmp://54.173.229.233:1935/test/test2Secondary Ingest-
AWS
답변함 4년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠