Amazon Virtual Private Cloud (Amazon VPC) lets you provision a private, isolated section of the Amazon Web Services (AWS) Cloud where you can launch AWS resources in a virtual network that you define. With Amazon VPC, you can define a virtual network topology that closely resembles a traditional network that you might operate in your own datacenter.
Questions tagged [amazon-vpc]
2516 questions
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
47
votes
2 answers
Adding AWS Lambda with VPC configuration causes timeout when accessing S3
I am trying to access S3 and resources on my VPC from AWS Lambda but since I configured my AWS Lambda to access VPC it's timing out when accessing S3.
Here's the code
from __future__ import print_function
import boto3
import logging
import…

Chenna V
- 10,185
- 11
- 77
- 104
41
votes
4 answers
AWS Private Link vs VPC Endpoint
What is the difference between Private Link and VPC endpoint? As per the documentation it seems like VPC endpoint is a gateway to access AWS services without exposing the data to internet. But the definition about AWS private link also looks…

mohangraj
- 9,842
- 19
- 59
- 94
36
votes
3 answers
How to import existing VPC in aws cdk?
Hi I am working on aws cdk. I am trying to get existing non-default vpc. I tried below options.
vpc = ec2.Vpc.from_lookup(self, id = "VPC", vpc_id='vpcid', vpc_name='vpc-dev')
This results in below error
[Error at /LocationCdkStack-cdkstack]…

Niranjan
- 1,881
- 6
- 44
- 71
35
votes
5 answers
What is the difference between AWS PrivateLink and VPC Peering?
Is VPC Peering secure? Do VPC Peering and PrivateLink not use an internet gateway or any other gateway?

Mukul
- 631
- 1
- 8
- 17
35
votes
3 answers
How to specify all ports in Security group - CloudFormation
I have my CloudFormation script like this now:
"SecurityGroupIngress" : [{
"IpProtocol" : "tcp",
"FromPort" : "0",
"ToPort" : "65535",
"CidrIp" : "0.0.0.0/0"
}]
and it looks like this, which is fine:
But I am…

Steven Yong
- 5,163
- 6
- 35
- 56
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
32
votes
3 answers
AWS Cloudfront for VPC/VPN
Does AWS allow usage of Cloudfront for websites usage, eg:- caching web pages.
Website should be accessible within corporate VPN only. Is it a good idea to cache webpages on cloudfront when using Application restricted within one network?

Chiran Ravani
- 371
- 2
- 4
- 7
29
votes
3 answers
The ec2 instance can't access internet in a public subnet without a elastic ip address?
I working on aws. I created a public subnet which has a network ACL allows all net traffic, and associated with a internet gateway in the route table.
And then I create a ec2 instance without elastic ip and a ec2 instance with elastic ip in it, and…

Angle Tom
- 1,060
- 1
- 11
- 29
28
votes
3 answers
How to resolve "The maximum number of addresses has been reached" for AWS VPC Elastic IP addresses?
I'm working with CDK/CloudFormation and recently started getting this error when attempting to create a new stack:
The maximum number of addresses has been reached.
Looking in the AWS Management Console, there is a limit of 40 VPC IP addresses and…

Steve Chambers
- 37,270
- 24
- 156
- 208
28
votes
8 answers
Connecting to Amazon RDS instance through EC2 instance using MySQL Workbench
In AWS I have a VPC set up with a Bastion Host. The bastion host is a single EC2 instance with a public address trough which you can SSH to any other server on the VPC.
I have created an RDS MySQL instance within the VPC and I would like to connect…

iamyojimbo
- 4,233
- 6
- 32
- 39
26
votes
11 answers
AWS System Manager start session: An error occurred (TargetNotConnected) when calling the StartSession operation: is not connected
Problem:
When I try to locally connect to a running EC2 instance using the AWS System Session Manager CLI command: aws ssm start-session --target i-123456
I get the error:
An error occurred (TargetNotConnected) when calling the StartSession…

Marshallm
- 965
- 3
- 20
- 38
26
votes
8 answers
DNS problem on AWS EKS when running in private subnets
I have an EKS cluster setup in a VPC. The worker nodes are launched in private subnets. I can successfully deploy pods and services.
However, I'm not able to perform DNS resolution from within the pods. (It works fine on the worker nodes, outside…

Daniel
- 985
- 2
- 14
- 18
25
votes
4 answers
Terraform module - output variable as input for another module
I am new to terraform and trying to build an infrastructure with two subnets and VPC. I have created two modules
VPC
subnet
The VPC module will create a VPC and will return vpc_id as output, the same return vpc_id I am trying to use in the subnet…

Mahesh
- 296
- 1
- 3
- 4
25
votes
4 answers
Is there a way to assign a Static IP to a AWS Lambda without VPC?
I am looking to assign a static IP to my Lambda which is being invoked via the API gateway. This is required because, the downstream system that i invoke from this lambda accepts web requests only from a Whitelisted IP.
I am successful in achieving…

infernal_lad
- 425
- 1
- 7
- 13