Skip to content

How to use Block Public Access for internet facing services

0

Hi Everyone,

I'm confused by the VPC "Block Public Access" feature. I thought that this would block all access to internal services, but allow access via a load balancer or NAT gateway. However, when I enabled it, the load balancer traffic was blocked too.

Is it possible to use this feature, but allow ingress via the load balancer, and egress via a NAT gateway?

Thanks

2 Answers
2
Accepted Answer

Hello,

VPC Block Public Access impacts internet-facing Network and Application Load Balancers.
Block Public Access Basics

To allow access to your internet-facing Load Balancers, the best option would likely be to exclude your public subnets from the Block Public Access VPC Feature. By doing this, your NAT gateway will also function properly again.

For the NAT Gateway, you can also use an egress-only exclusion.
Block Public Access to VPCs and Subnets

answered a year ago

EXPERT

reviewed a year ago

2

Recommend checking the launch blog

Granular Control with Exclusions

We understand that some resources within a VPC may require bidirectional internet access. Or, you may have use cases, such as centralized traffic inspection, that require an egress-only internet path that Amazon VPC Block Public Access bidirectional or ingress-only block would otherwise reject. To address this need, Amazon VPC Block Public Access includes granular exclusion capabilities. Administrators can specify individual VPCs or subnets to exclude from Amazon VPC Block Public Access enforcement, allowing for targeted internet access where necessary. You can configure these exclusions to permit either all (bidirectional) or only outbound (egress-only) internet access. Like ingress-only block, when you allow an egress-only exclusion, egress traffic from a VPC or subnet is permitted only from NAT Gateways and EIGWs.

AWS
EXPERT

answered a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.