A Virtual Private Cloud (VPC) is an on demand configurable pool of shared computing resources allocated within a public cloud environment, providing certain level of isolation between the different organizations (denoted as users hereafter) using the resources. Please note that this tag is exclusively for programming questions.
Questions tagged [vpc]
655 questions
148
votes
4 answers
Why do we need private subnet in VPC?
There are 4 scenarios in AWS VPC configure. But let's look at these two:
Scenario 1: 1 public subnet.
Scenario 2: 1 public subnet and 1 private subnet.
Since any instance launched in public subnet does not have EIP (unless it's assigned), it is…

Tommy
- 7,400
- 4
- 30
- 26
85
votes
3 answers
Why can't an AWS lambda function inside a public subnet in a VPC connect to the internet?
I've followed the tutorial here to create a VPC with public and private subnets.
Then I set up an AWS lambda function inside the public subnet to test if it could connect to the outside internet.
Here's my lambda function written in python3
import…

Brian
- 12,145
- 20
- 90
- 153
80
votes
5 answers
Amazon ELB in VPC
We're using Amazon EC2, and we want to put an ELB (load balancer) to 2 instances on a private subnet. If we just add the private subnet to the ELB, it will not get any connections, if we attach both subnets to the ELB then it can access the…

Kevin Willock
- 1,912
- 1
- 13
- 16
75
votes
2 answers
Amazon ELB for EC2 instances in private subnet in VPC
I'm using Amazon EC2, and I want to put an internet-facing ELB (load balancer) to 2 instances on a private subnet. I am using VPC with public and private subnets.
If I just add the private subnet to the ELB, it will not get any connections.
If I…

Manish Singh
- 5,848
- 4
- 43
- 31
54
votes
10 answers
How to connect to outside world from amazon vpc?
I have amazon VPC set through wizard as "public only network", so all my instances are in public subnet.
Instances within VPC that have Elastic IP assigned connect to internet without any troubles.
But instances without elastic IP can't connect…

Andrey Regentov
- 3,687
- 4
- 34
- 40
44
votes
3 answers
CIDR Address is not within CIDR Address from VPC
I have tried every combination of IP ranges for my CIDR block on my new VPC for AWS.
My current CIDR is 172.31.0.0/16
171.31.0.0/32 (CIDR Address is not within CIDR Address from VPC)

Jeff Voss
- 3,637
- 8
- 46
- 71
34
votes
1 answer
Multiple VPC and Subnet with same CIDR blocks
I realized that I can create multiple AWS VPCs and Subnets with Same CIDR blocks, I am not sure what is the philosophy behind that and how it is possible.

Vaibhav Jain
- 2,155
- 5
- 27
- 41
26
votes
6 answers
I can't delete my VPC
I want to delete one of my VPC but when i was trying to delete, this error appeared.
We could not delete the following VPC (vpc-8737bde2 (10.100.0.0/16) | Khoi-VPC)
The vpc 'vpc-8737bde2' has dependencies and cannot be deleted. (Service:…

The One
- 2,261
- 6
- 22
- 38
25
votes
2 answers
Default AWS VPC vs A new one?
Should I use the AWS Default VPC, or should I create a new one?
What are the differences and advantages to create a new one?
Or, in witch situations should I select between the two?

Ofer Velich
- 1,959
- 4
- 19
- 24
22
votes
4 answers
ec2 error starting instances insufficient capacity
We have created an AWS EC2 instance in Asia Pacific (Mumbai) region on Shared Hardware rental type. We are trying to start an instance after shut down and we are getting pop up error stating instances insufficient capacity message on screen. On…

Balaraju M
- 473
- 1
- 3
- 14
21
votes
2 answers
Confusion Around Creating a VPC Access Connector
I am trying to set up Serverless VPC access
Serverless VPC Access enables you to connect from your Cloud Functions directly to Compute Engine VM instances, Memorystore instances, Cloud SQL instances,
Sounds great. But the documentation is not…

1252748
- 14,597
- 32
- 109
- 229
20
votes
3 answers
AWS NLB in public subnets with EC2 in private subnets
Has someone configured a NLB in the public subnets of your VPC to route traffic to EC2 instances that are in the private subnets?
When using an ELB, a good solution is to create a Security Group for the ELB and then create another SecurityGroup for…

Luis
- 595
- 2
- 7
- 16
17
votes
4 answers
Terraform throws "groupName cannot be used with the parameter subnet" or "VPC security groups may not be used for a non-VPC launch"
When trying to figure out how to configure a aws_instance with AWS VPC the following errors occur:
* Error launching source instance: InvalidParameterCombination: The parameter groupName cannot be used with the parameter subnet
status code: 400,…

Dennis Hoer
- 3,039
- 2
- 23
- 34
16
votes
10 answers
How to run the Microsoft Windows XP VHD, for testing with IE 6.0, with a valid/un-expired date?
I just downloaded the VHD for windows xp:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11575
But when I start the virtual pc it says that "the evaluation period for this copy of windows has ended..."
I read that for the…

The Light
- 26,341
- 62
- 176
- 258
13
votes
2 answers
How to validate an invalid CIDR block?
I have the following CIDR reserved for my VPC -> 10.0.0.0/22
What this tells me is that I have 10 bits leftover for my host ips or 1,024 addresses. I was attempting to compute the range of valid addresses, as Amazon asks for a valid IPv4 CIDR block…

John Lippson
- 1,269
- 5
- 17
- 36