Yaml template validation issue with template Parameters

0

I have parameter variables. how to refer to multiple ref variables in one line? Parameter:

 s3Bucket:
    Type: String
    Description: -------
    Default: '...'
 s3Path:
     Type: String
     Description: -------
     Default: '...'
 libraryFile:
     Type: String
     Description: ------
     Default: '...'

S3Bucket: !Ref s3Bucket S3Key: !Ref s3Path/libraryFile

S3Key is throwing validation error.

2개 답변
0
수락된 답변

If I understand your question correctly, it's Fn::Sub that you're after. e.g:

S3Bucket: !Sub ${s3Bucket}/${s3Path}/${libraryFile}
전문가
답변함 일 년 전
  • Thank you! This is exactly what I was looking for. It worked fine.

0

Take a look at the Fn::Join function. You can build your full S3Key using this.

S3Key: !Join
  -- '/'
    - !Ref s3Path
    - !Ref libraryFile
profile pictureAWS
전문가
kentrad
답변함 일 년 전
  • Thank you Kentrad! I applied join function as well. This is working too.

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

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

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

관련 콘텐츠