Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to modify multiline parameters in CloudFormation?

I created a CloudFormation stack using the ECS wizard. I want to customize some UserData entries to modify some parameters. However, as you can see in the picture, the parameters that must appear in multiple lines are shown in one line. Checking the current parameter, it is applied to multiple lines. After modifying this in the web UI, the UserData parameter is changed to one line, so the script does not work. Is there a way to update the values normally?

enter image description here

like image 635
youngminz Avatar asked Dec 21 '19 13:12

youngminz


1 Answers

Unfortunately, the CloudFormation console does not currently support inputting multiline parameters

There are a couple workarounds:

  • The aws cli supports multiline parameters: --parameters ParameterKey=<>,ParameterValue='line 1 line 2'
  • Removing the Fn::Base64: function from UserData in the template and passing the already Base64 encoded string as the parameter should remove the need for that parameter being multiline
  • Avoiding explicitly inputting parameter values if using the default or previous value of a parameter is desired: --parameters ParameterKey=<>,UsePreviousValue=true
like image 179
Pat Myron Avatar answered Oct 15 '22 00:10

Pat Myron