I can't find a way to specify a user-data after creating ECS instance definition.
Document says You can pass this user data into the Amazon EC2 launch wizard in Step 6.g of Launching an Amazon ECS Container Instance.
ECS is launched automatically, how do you specify the user data?
I want to send /var/log/syslog
to cloudwatch and I need to add user data
(https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_cloudwatch_logs.html)
I had to add the user data as a autoscaling group property
steps are
- copy existing launch configuration
- edit user data of the launch configuration
- edit autoscaling group to use the created launch configuration
- terminate ecs instances so that the modified autoscaling group launches new ec2 with new launch configuration