Launch EC2 instance for ECS cluster
Launch EC2 instance for ECS cluster
EC2 part
go to EC2 dashboard
click *create instance
step 1. Choose AMI
search Amazon ECS-optimized AMIs for your region in this case ap-northeast-2 region recommended
ami-030c18dab55018cb3
step 2. Choose Instance Type -> pass
step 3. Configure Instance -> you must set User data
in Advance Details section put User data 'As text'
step 4. Add Storage -> pass
step 5. Add Tags -> pass
step 6. Configure Security Group -> select your VPC default or create new one
step 7. review and launch -> pass
Don't forget attach *ecsInstanceRole
How can I execute user data to automatically create a file with every restart of my Amazon EC2 instance?
Short Description
By default, user data scripts and cloud-init directives run only during the first boot cycle when an instance is launched.
if instance failed to register on ECS you should make 'ecs.config' maunally ( NOT RECOMMEND)
Start the Docker daemon.
You the see the agent logs in: /var/log/ecs
change instance type
instance settings > Change instance type
ECS part
select service
service update and check *Force new deployment
click update
Amazon ECS-optimized AMIs
Bootstrapping Container Instances with Amazon EC2 User Data
Last updated
Was this helpful?