ℹ️ Information: Security groups act as virtual firewalls that control the traffic allowed to and from your EC2 instances. In this section, we’ll create a security group specifically configured for Windows instances with the necessary ports for common Windows workloads.
Sign in to the AWS Management Console

Click Create security group and configure the basic details:
Windows-SGSecurity group for Windows instance
In the Inbound rules section, click Add rule to add the following rules:
🔒 Security Note: When configuring security group rules, always follow the principle of least privilege by only opening ports that are necessary for your application to function. In production environments, you should restrict traffic sources whenever possible rather than allowing access from any IP address (0.0.0.0/0).
💡 Pro Tip: For each rule, you need to specify the following information:
Name: A name for the rule (up to 255 characters, including a–z, A–Z, 0–9, spaces, and ._-:/()#,@[]+=;{}!$*)
Protocol: The allowed protocol (TCP, UDP, ICMP)
Port range: For TCP/UDP, specify a single port (e.g., 22) or a port range (e.g., 7000–8000)
Source: The allowed traffic source, which can be:

For Outbound rules, the default allows all outbound traffic, which is typically acceptable for most use cases
In the Tags section:
Click Create security group to complete the process

Verify that your Windows security group has been created successfully

💡 Pro Tip: Use descriptive tags for your security groups to make them easier to identify when you have multiple security groups across different environments.
