Next, we need to secure the EC2 instances in both environments. First, let’s create security groups for the EC2 instance in the development environment.
Security
section of the VPC consoleWe will enter the following settings for the security group of the EC2 instance in the development environment:
dev-ec2-sg
Allow SSH and other private connections
development-vpc
Next, create a security group for the EC2 instance in the production environment:
prod-ec2-sg
Allow SSH and other private connections
production-vpc
10.1.0.0/16
(Dev VCP)imga-nlb-sg
in belowIn image, I forget to add the second Inbound Rule :D
Once created, we now have the two desired security groups.
Finally, setup SG for Load Balancer and other resources
Allow SSH and other private connections
production-vpc
prod-ec2-sg
Re-check