Each ECS instance must join at least one security group. For more information, see Security groups.
If you do not have a security group when your create an ECS instance, you can use the default one provided by the system. For more information, see Default security group rules.
Alternatively, you can create a security group to meet your business needs and add your instances to it.
To create a VPC-Connected security group, you must Create a VPC.
Note: You can create a VPC-Connected security group across VSwitches, but not across VPCs.
Log on to the
In the left-side navigation pane, select Networks & Security > Security Groups.
Select a region.
Click Create Security Group.
In the Create Security Group dialog box, complete the following configurations:
Template: If the instances in the security group are for Web server deployment, select an ideal template to simplify security group rule configuration.
Scenario Template Description To deploy a Web server on the Linux instances in the security group Web Server Linux By default, inbound traffic to port TCP 80, TCP 443, TCP 22, and for ICMP is allowed. To deploy a Web server on the Windows instances in the security group Web Server Windows By default, inbound traffic to port TCP 80, TCP 443, TCP 3389, and for ICMP is allowed. Not for Web server Customize After the security group is created, add a security group rule to meet your business needs.
Security Group Name: Specify a valid security group name.
Description: Give a brief to the security group for future management.
- To create a VPC-Connected security group, select VPC and then a specific VPC.
- To create a classic network-connected security group, select Classic.
For a new security group without any rules, the following default rules apply to the communication of all the instances in the group over Internet or intranet:
- Outbound: Allow all for outbound traffic.
- Inbound: Drop all for inbound traffic.
After you create a security, add a security group rule.
To meet your business needs, add an ECS instance to a security group.