Skip to content

Commit 0339046

Browse files
committed
Change egress rules to only allow outbound HTTPS traffic
1 parent 9a5769f commit 0339046

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

terraform/service/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ resource "aws_security_group" "lambda_sg" {
1616
cidr_blocks = ["10.0.0.0/16"] // Allow HTTPS traffic within VPC
1717
}
1818
egress {
19-
description = "Allow all outbound traffic to any destination"
20-
from_port = 0
21-
to_port = 0
22-
protocol = "-1"
23-
cidr_blocks = ["0.0.0.0/0"] // Allow all outbound traffic
19+
description = "Allow all outbound HTTPS traffic to any destination"
20+
from_port = 443
21+
to_port = 443
22+
protocol = "tcp"
23+
cidr_blocks = ["0.0.0.0/0"] // Allow all outbound HTTPS traffic
2424
}
2525
}
2626

0 commit comments

Comments
 (0)