You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(ec2): document Network ACL usage and default NACL workaround
The default Network ACL created with a VPC allows all inbound and
outbound traffic (rule 100), and CDK does not manage it. Users cannot
remove or modify these permissive rules through CDK.
Add a Network ACLs section to the README documenting:
- How to create a custom Network ACL and associate it with subnets
- How to work around the default NACL's permissive rules by replacing
it with a custom NACL that only allows specific traffic
Closes#13220
When a VPC is created, AWS automatically creates a [default Network ACL](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html#default-network-acl)
746
+
that allows all inbound and outbound traffic (rule 100). CDK does not manage the default Network ACL,
747
+
so its permissive rules cannot be removed or modified through CDK.
748
+
749
+
To restrict traffic at the Network ACL level, create a custom Network ACL and associate it with
750
+
the desired subnets. When a custom Network ACL is associated with a subnet, it replaces the default
751
+
Network ACL for that subnet. Custom Network ACLs deny all traffic by default, so you must
752
+
explicitly add entries for the traffic you want to allow:
753
+
754
+
```ts
755
+
declareconst vpc:ec2.Vpc;
756
+
757
+
// Create a custom NACL that replaces the default permissive NACL
0 commit comments