You can pass user data when you launch an Amazon ECS container instance. This data will perform some automated configuration or run the scripts, when the instance boots. The most common use case to add a user data configuration is to pass the Docker daemon and Amazon ECS container agent information. You can also add the cloud boot hooks, cloud-init directives, and shell scripts.
You can write a single agent configuration variable by using echo to copy the variable in the ecs.config file. If you want to write multiple agent configuration variables, then you can use the heredoc format by adding the lines between cat and end of the ecs.config file.
Docker daemon configuration can be ...