A security group acts as a firewall for our EC2 instance. We can restrict access to our EC2 by defining on which protocol, port, and IP address EC2 is accessible. We can also define a CIDR block so that a group of IP addresses are able to access EC2 instances.
Security groups
AWS Management Console
Go to AWS EC2 Management Console at https://console.aws.amazon.com/ec2/home.
Creating a security group
Create a new security group under your AWS account:
Click Security Groups under NETWORK & SECURITY in the left menu. Click Create Security Group:
Figure...