Created
April 1, 2020 18:37
-
-
Save leandrosiow/0ea71dc5698583eb9cb64305dd23a91d to your computer and use it in GitHub Desktop.
Here is how to create an ECS container instance via the CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ec2 run-instances --image-id ami-088dbc54f17f8a1a2 --count 1 --instance-type t3.large --key-name mysshey --subnet-id subnet-XXXXXXXXXXXXXXXXX --iam-instance-profile Name=ecsInstanceRole --security-group-ids sg-XXXXXXXXXXXXXXXXX --user-data file://ecs.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
echo ECS_CLUSTER=cluster-name >> /etc/ecs/ecs.config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment