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 Respostas
0
Resposta aceita

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

S3Bucket: !Sub ${s3Bucket}/${s3Path}/${libraryFile}
ESPECIALISTA
respondido há um ano
  • 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
ESPECIALISTA
kentrad
respondido há um ano
  • Thank you Kentrad! I applied join function as well. This is working too.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas