Questions tagged [aws-nat-gateway]
75 questions
1
vote
1 answer
Why am I seeing InvalidInstanceID.Malformed in my NAT Gateway's Route?
I am trying to create a Stack using AWS CDK (in Javascript). In my stack, I would like to create a NAT gateway in a public subnet that is referenced by Route Table in my private subnet. Pretty standard stuff.
Below is a snippet of the relevant code…

systems_n_systems
- 43
- 6
1
vote
0 answers
how to call outside firewall protected service from aws ecs
I have a requirement where I was to call firewall-protected service from ecs container. IP can be added to the firewall white list however I am struggling to get static IP for my ecs service. Below are things that I tried
Created NAT…

Rishi Saraf
- 1,644
- 2
- 14
- 27
1
vote
1 answer
AWS EC2 Internet access from behind Load Balancer
Using Terraform to setup a VPC with two EC2s in private subnets. The setup needs to SSH to the EC2s to install package updates from the Internet and install the application software. To do this there is an IGW and a NAT-GW in a public subnet. Both…

LinuxGuru
- 341
- 2
- 11
1
vote
1 answer
AWS fargate logging to cloudwatch causes NAT traffic - how to avoid
We got a substantial increase in AWS cost this month which we can track down to ec2-other / EU-NatGateway-Bytes. Our best guess is that this is due to a fargate task that got into trouble and generated a lot of cloudwatch messages. What's unclear is…

Peter Coppens
- 103
- 2
- 7
1
vote
1 answer
AWS NAT Gateway - See the content
First, I saw in the billing section how much I pay for NAT Gateway, I need to understand exactly what I'm paying for, I suspect that the git checkout (we use GitHub) from our instances takes the most of the cost, but I need some way to prove / see…

Roman G
- 23
- 2
1
vote
2 answers
Attach each EIP to each Nat Gatway in Terraform
I'm creating two public subnets that will each contain a nat gateay. My code, attempts to create these nats per subnet, and then allocate the eip to each. However, since my for each starts the code block, it looks like the allocation id became…

koda
- 23
- 4
1
vote
0 answers
How does an ECS service communicate with a container instance which is running inside a private subnet?
Today, I was reading about the AWS container orchestration tool which is ECS. I have one question about this. If we place an Ec2 instance on a private subnet, then we require a NAT gateway so that ECS agent can provide info to the ECS service. But…

bharat kendre
- 23
- 4
1
vote
1 answer
how to list all the NAT Gateway in a VPC via CDK?
In CDK, i see that NAT gateways are represented as CfnNatGateway. I am just whether there is any way to list all the CfnNatGateway.
My purpose is to whitelist the elastic ips of those NAT gateways through CDK.

Bhupesh Subramaniam
- 51
- 6
1
vote
1 answer
Why does accessing private EC2 instance via Session Manager need NAT Gateway?
I create two VPCs, one private subnet for each VPC and one EC2 instance (that has a role with the IAM policy "AmazonSSMManagedInstanceCore") for each private subnet. The only difference of these two environments is with/without NAT Gateway.
I tried…

dmjy
- 1,183
- 3
- 10
- 26
1
vote
1 answer
Multiple EC2 instance in public subnet should have same IP address for outgoing traffic
I have an application hosted on an EC2 instance in public subnet. To integrate this app with a partner we need to whitelist public IP address of the EC2 instance on partner's firewall.
I want to configure auto-scaling of the application in such a…

Vansh Kumar Madan
- 15
- 3
1
vote
0 answers
Post Request inside a lambda to public API
I'm trying to make HTTP post request inside my Lambda function to call an EC2 public API, that has a container running on it.
I am lost between all the pages on the Internet, so what are the need to achieve getting the response in my lambda to keep…

Yahya
- 51
- 7
1
vote
0 answers
AWS Lambda Timeout when making Https request with NAT Gateway in place
I have a containerized Lambda deployed that uses the latest image from ECR. I have also already setup the networking with the following:
Subnets
Route…

golf_dev6
- 11
- 1
1
vote
0 answers
AWS ECS (EC2 autoscaling group) Do I need a NAT Gateway?
Here is my simple question:
I have a dockerized app that I want to host on ECS.
This app does not need to be accessible from the outside world
however it needs to communicate with the outside world.
For some cost reasons, I want to run it on an…

Alexis Darnat
- 581
- 6
- 13
1
vote
1 answer
AWS NAT Gateway Public IP Address for Whitelisting with Public Subnet
I have an EC2 instance in a public subnet and I assigned an EIP to the instance and the IP address is Whitelisted to reach my company's network. The Instance must have a public IP address but I don't want to use EIP here. Whenever I restart the…

Kenot Solutions
- 377
- 1
- 4
- 11
1
vote
1 answer
can a lambda function inside a private subnet access aws services outside the vpc through vpc endpoints?
I am deploying an application where I am using a NAT gateway with a lambda inside a private subnet to talk to other AWS services outside the vpc. Everything is working fine but the NAT gateway adds alot of extra costs to the billing. I am assuming…

Hamza J
- 69
- 1
- 9