How does VPC relate to EC2 in AWS?

0

How to explain to a complete beginner about the relationship between EC2 and VPC? I've recently encountered this problem when viewing a online Udemy course. It has an episode instructing the viewers to set up a VPC. It doesn't explain when to use such a VPC when you can simply launch a EC2 and use the instance directly.

Is VPC a virtual box that you can put stuff like EC2 inside it?

北美38fule

Posted 2019-12-31T20:27:58.637

Reputation: 27

Answers

1

VPC helps you to have your custom network and allows you to have grouped networks for your resources. For example, you can maintain webservers and databases in one network and if you also have any other application servers and api servers and their respective environments can be maintained in a different network. Basically network isolation helps you to manage your resources effectively.

rajesh_Gujjuka

Posted 2019-12-31T20:27:58.637

Reputation: 48

Could you point out a link for further reading on this? Thanks. – 北美38fule – 2020-01-13T19:49:33.677

Hope this helps:

  1. https://start.jcolemorrison.com/aws-vpc-core-concepts-analogy-guide/

  2. AWS Documentation: https://aws.amazon.com/quickstart/architecture/vpc/

                                     https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html
    
– rajesh_Gujjuka – 2020-01-14T16:40:42.247

Very informative links. Thanks. – 北美38fule – 2020-01-14T20:54:23.333

1

EC2-Classic is the original release of Amazon EC2. In EC2-Classic, instances run in a single, flat network that is shared with other customers. With EC2-VPC, instances run in a virtual private cloud that is logically isolated to only one AWS account.

Source: Link

Dave

Posted 2019-12-31T20:27:58.637

Reputation: 83

I've hit that link earlier than posting my question actually. Unfortunately it doesn't answer my question. I knew modern version of EC2 are launched within VPC, that's why I thought it is a box. But isn't such box redundant? Or more flexible than it seems? – 北美38fule – 2019-12-31T20:43:49.850

1My understanding is that VPC is the "next gen" platform for EC2. VPC resembles a traditional network, and you can integrate your resources into your existing infrastructure. I know that, at least on our newer accounts, we can no longer sign up for EC2-Classic, as AWS is moving its customers to VPC instances. – Dave – 2019-12-31T21:06:00.430

Yes, I agree with what you said. But why setting up VPC manually when you can simply launch your EC2 with VPC included already? What's the point? – 北美38fule – 2019-12-31T22:43:17.383

0

I suggest you need to do training that starts at the beginning, explaining VPC, EC2, etc properly. Alternately you can read the AWS documentation.

A quick overview: VPC is virtual private cloud. It can be thought of as a virtual data center or a virtual network. You deploy AWS resources including EC2 servers, RDS databases, or any of there 160+ other services into a VPC. There are a few services that do not use VPCs - for example the Transit Gateway is an account level service that lets you connect VPCs across many accounts.

VPCs are isolated from each other and the internet by default. You can peer VPCs, and you can add an internet gateway.

Each VPC has a CIDR network address range, most people use /16 networks with /24 subnets. You cannot peer VPCs that have overlapping CIDR ranges.

VPCs are not a physical resources, they're a virtual resource based on the AWS hyperplane (there's a good session on the hyperplane on youtube from Re:Invent). They're highly available with no single point of failure.

Tim

Posted 2019-12-31T20:27:58.637

Reputation: 529

Are you interested in a remote pair programming? I can pay you. I found your overview very helpful. Thanks. – 北美38fule – 2020-01-09T21:54:06.880

Is CIDR ever needed to be set manually? Or just leave it as default values? – 北美38fule – 2020-01-09T22:02:02.177

Look in my profile for a link to my services website, but I don't do remote pair programming. You have to set the CIDR for each VPC and subnet manually. – Tim – 2020-01-10T00:39:56.063