You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for custom user data with the ECS CLI:
- multiple user data files can be specified with --extra-user-data
- the CLI supports all user data formats (shell scripts and cloud-init directives)
- the passed in user data file can be a MIME Multipart archive
- all extra user data is concatenated into a single MIME Multipart archive, which includes a CLI generated shell script to join the ECS Cluster
Copy file name to clipboardExpand all lines: README.md
+23Lines changed: 23 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -327,6 +327,29 @@ ecs-cli up --cluster myCluster --empty
327
327
328
328
This is equivalent to the [create-cluster command](https://docs.aws.amazon.com/cli/latest/reference/ecs/create-cluster.html), and will not create a CloudFormation stack associated with your cluster.
329
329
330
+
#### User Data
331
+
332
+
For the EC2 launch type, the ECS CLI always creates EC2 instances that include the following User Data:
This user data directs the EC2 instance to join your ECS Cluster. You can optionally include extra user data with `--extra-user-data`; this flag takes a file name as its argument.
340
+
The flag can be used multiple times to specify multiple files. Extra user data can be shell scripts or cloud-init directives- see the [EC2 documentation](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) for more information.
341
+
The ECS CLI takes all the User Data, and packs it into a MIME Multipart archive which can be used by cloud-init on the EC2 instance. The ECS CLI even allows existing MIME Multipart archives to be passed in with `--extra-user-data`.
342
+
The CLI will unpack the existing archive, and then repack it into the final archive (preserving all header and content type information). Here is an example of specifying extra user data:
0 commit comments