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}
エキスパート
回答済み 1年前
  • 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
回答済み 1年前
  • Thank you Kentrad! I applied join function as well. This is working too.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ