Skip to content

Commit eccdf5d

Browse files
committed
apigw-http-api-lambda-terraform: Use aws_s3_bucket_public_access_block
1 parent 051003b commit eccdf5d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

apigw-http-api-lambda-terraform/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ resource "aws_s3_bucket" "lambda_bucket" {
2828
force_destroy = true
2929
}
3030

31-
resource "aws_s3_bucket_acl" "private_bucket" {
31+
resource "aws_s3_bucket_public_access_block" "lambda_bucket" {
3232
bucket = aws_s3_bucket.lambda_bucket.id
33-
acl = "private"
33+
34+
block_public_acls = true
35+
block_public_policy = true
36+
ignore_public_acls = true
37+
restrict_public_buckets = true
3438
}
3539

3640
data "archive_file" "lambda_zip" {
-730 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)