amazon web services - Cloudformation ECS cluster -


i attempting write cloud formation template create launch configuration, asg, ecs cluster, , register ec2 instances in asg said cluster.

i have long userdata.sh file used setup launch configuration.

by putting userdata in yaml file i.e.

   ...    userdata:       fn::base64: !sub |          #!/bin/bash         ... 

it looks pretty terrible. also, when try , plug in cluster name ecs agent ${ecscluster} sub, "variable names in fn::sub syntax must contain alphanumeric characters, underscores, periods, , colons". environment variables in userdata take on same form ${env_variable}.

i've tried passing userdata file aws cloudformation stack receive "template format error: yaml not well-formed. "

what recommended way passing in complex userdata.sh file cft in such way can add cluster name ecs-agent config?

error stating doesn't way reference variable in fn::sub. instead of $(ecscluster) needs ${ecscluster}. see examples in docs.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -