- Newest
- Most votes
- Most comments
Once the ECS cluster is created on EC2, EC2 AutoScaling can be configured.
You can then set up the security group by updating it from the startup template associated with the EC2 AutoScaling configuration.
The following document describes how to update the startup template.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-launch-template-versions.html
After updating the startup template, please also change the version of the startup template referenced by EC2 AutoScaling to the newer version.
Doing so will start EC2 with the new version.
Services can be created after the cluster has been created.
Security groups can be configured from Networking when the service is created.
You can then set up security groups in the Networking section.
The following images are in Japanese, but they are from my screen when creating a service.
The red box is the security group setting.
When you change the launch type from Fargate to EC2, the Networking section disappears.
Relevant content
- asked 3 months ago
- asked 2 months ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago
That works, but it's quite annoying that you have to now do that added step. I guess another reason to use Fargate.
Is there any way to see all of the changes between the old and new flavors of the UI at the service-level?
At the moment, the new UI does not seem to support security group settings for EC2 startup types, so if you use EC2 startup types, it is better to create a startup template with security group settings in advance or to configure them in the old UI. Also, the only way to confirm the difference between the old and new UI seems to be to actually visually check it at this point.
Also, the following documentation indicates that the EC2 Auto Scaling group should be configured in the old console. https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-ec2-cluster-console-v2.html#capacity-providers