Skip to content

Instantly share code, notes, and snippets.

@leandrosiow
Created April 1, 2020 18:37
Show Gist options
  • Save leandrosiow/0ea71dc5698583eb9cb64305dd23a91d to your computer and use it in GitHub Desktop.
Save leandrosiow/0ea71dc5698583eb9cb64305dd23a91d to your computer and use it in GitHub Desktop.
Here is how to create an ECS container instance via the CLI
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
#!/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