Create VPC Security Group

Create VPC Security Group

Prerequisite: EC2 Linux Hands-On Lab

In EC2 Linux Hands-On Lab, we launched a web server EC2 instance with the security group, Immersion Day - Web Server, that allows TCP 80 for the web server.

First, we will create a new VPC security group, Immersion Day - DB Tier, for our database tier that only allows traffic from our web tier.

1.In the VPC dashboard, click Security Groups, then the Create Security Group button. Type Security group name and Description as below and keep the VPC setting to the same VPC you’ve launched your EC2 instance in.

# Key Value
1 Security group name Immersion Day DB Tier
2 Description Immersion Day DB Tier
3 VPC VPC-xxxxxx (default)

3.Under Inbound Rules, click Add rule button. Add a new inbound rule for the EC2 server(s) in our web tier. The type should be MySQL/Aurora (3306), the protocol TCP (6), and in the source box, type the name of the security group to which your EC2 instance belongs. While you’re typing, a list of security group(s) that match that name should be presented to you. Select your security group.

4.Set Name tag and group name to Immersion Day DB Tier. Then, scroll down and click Create security group button. This will create the Security group for your RDS instance.

5.When successful.