May 2018
Intermediate to advanced
554 pages
13h 51m
English
Before launching your Virtual Server (EC2), you need to create a Security Group that has an appropriate security rule. Now, we have two subnets, public and private. Let's set public subnet such that it allows ssh (22/tcp) and http (80/tcp) from the internet. Then, set the private subnet such that it allows ssh from the public subnet:
$ aws ec2 create-security-group --vpc-id vpc-69cfbd12 --group-name public --description "public facing host"{ "GroupId": "sg-dd8a3f94"}
$ aws ec2 authorize-security-group-ingress --group-id sg-dd8a3f94 --protocol tcp --port 22 --cidr 0.0.0.0/0
Read now
Unlock full access