AWS security groups:
Aws security groups acts as the ideal tool for securing EC2 instances. they are important tools to secure your cloud environment. security groups provide wide-ranging security functionalities on AWS.
These security groups act as a firewall for your Amazon EC2 instances for controlling inbound as well as outbound traffic. If you want to work on Amazon EC2, you need to assign it to a particular security group. They are very flexible. You can use the default security group and use it as you wish. With the help of AWS online training, you can write the corresponding code or use the Amazon EC2 to make the process faster.

Best practices of AWS security groups:
The best practices of AWS security groups are,
VPC flow logging: VPC stands for virtual private cloud. VPC flow logs contain the visibility into network traffic that crosses the VPC, As well as it can be used to find anomalous traffic and provide insight during security workflows. It is one of the AWS network monitoring services. It is used to detect security and access issues like overly permissive security groups and alert on anomalous activities. An anomalous activity means rejected connection requests or unusual levels of data transfer.
If you are interested to Learn AWS You can enroll for free live demo AWS Online Training
EC2: EC2 security groups have large ranges in ports open. With large port ranges, vulnerabilities could be exposed. An attacker can scan the ports and identify vulnerabilities of hosted applications but not easy to trace because it has large port ranges.
RDS: It permits instances, whenever VPC security groups associated with RDS instances. An entity in the RDS internet can establish a connection to your database.
Discrete security groups: Minimize the number of discrete security groups and decrease the risk of misconfiguration leading to accounts.
Outbound process: It controls the outbound access from the ports to required entities like specific ports or specific destinations.
Types of AWS of security groups:
The types of AWS security groups are improving clarity regarding their implementations on AWS. there are two types of security groups. The first one is EC2-classic and the second one is the EC2-VPC.
EC2-Classic: These security groups allow only the creation of inbound rules. And after launching the instance, you will assign a different security group to it. With the help of the EC2-Classic security group. you dont need to specify any protocol for adding a rule.
EC2-VPC: These security groups allow the besides inbound and outbound rules. In the EC2-VPC security group, you could change the assigned group. in EC2-VPC you need to specify the protocol.
AWS Security Group rules:
We can add or remove rules for the security group. Those rules are applicable to inbound traffic or outbound traffic.
The following are the basic rules for AWS security groups.
1. In inbound rules, the source of the traffic is either the destination port or port range. As well as the source can be another security group, an IPv4 or Ipv6 CIDR block, or a single IPV$ or Ipv6 address.
2. In Outbound rules, the destination for the traffic is the destination port or port range. A destination is also a security group, an IPV4 or IPV6 CIDR block and a single IPV4 or IPV6 address.
3. Every protocol that has a standard protocol number. You can specify ICMP as the protocol, then you can specify any or all of the ICMP types and codes.
4. A description of the security group rule help you identify it later. A description can contain 255 characters in length. It allowed characters are a-z, A_Z, 0-9, spaces, and special characters like “_”, “-“, #, @, etc.
The following diagram shows about rules in the security groups:
Type: This allows you to select commands protocols like SSH, RDP, or HTTP. you can also choose custom protocols.
Protocol: If you want to create a custom protocol, here you can specify a protocol like TCP/UDP, etc.
Port range: It is used to give default port or port range for your chosen protocol.
Source: It is a network subnet range for a specific IP address or another AWS security group.
Description: This field allows us to add a description of the rule that has been added.
How to create Security groups?
We can create security groups in different ways, such as the AWS CLI and AWS Management Console. Given below are the steps that help to create a security group according to your requirements.
1. First register into the AWS Management Console.
2. Then Choose the EC2 service.
3 And select the Security Groups in the Network &Security category. It is shown below.
4. Then choose the “create security Group “option.
5. Insert the name and description of the security group.
6. Choose an appropriate VPC.
7. Add the desired rules according to your requirements through the “Add Rule” option.
Limitations of AWS security groups:
There are a number of default AWS security group limits, that we have to remember while creating an AWS security group: they are
1. The VPC security groups per region must contain VPC=2500
2. Rules per security are equal to 120 and it doesn’t contain not more than 60 inbound and 60 outbound.
3. As well as Security groups per network interface are must equal 5.
Learn for more information on Amazon EC2 you can enroll for free live demo AWS Online Course
Benefits for AWS security groups:
- It activates the flow logging for your virtual cloud logging. Flow logging can help in identifying the malicious sights along with insights. Hence, you can identify the various issues related to access and security.
- It can identify the vulnerabilities in your PC.
- It contains limited outbound access from ports to specific ports or destinations.
- It does not allow unrestricted inbound access to uncommon ports.
- With the help of discrete security groups, you can avoid the misconfigurations on your accounts.
In this article, I have explained about AWS security groups and their creation. You can get more AWS Security group examples at AWS Online course I hope this gave awareness about the AWS security groups.