Skip to content

Commit 3437871

Browse files
committed
apigw-lambda-dynamodb-terraform: Use aws_s3_bucket_public_access_block instead of aws_s3_bucket_acl
1 parent 17536ab commit 3437871

File tree

1 file changed

+6
-2
lines changed
  • apigw-lambda-dynamodb-terraform

1 file changed

+6
-2
lines changed

apigw-lambda-dynamodb-terraform/main.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ resource "aws_s3_bucket" "lambda_bucket" {
5656
force_destroy = true
5757
}
5858

59-
resource "aws_s3_bucket_acl" "private_bucket" {
59+
resource "aws_s3_bucket_public_access_block" "private_bucket" {
6060
bucket = aws_s3_bucket.lambda_bucket.id
61-
acl = "private"
61+
62+
block_public_acls = true
63+
block_public_policy = true
64+
ignore_public_acls = true
65+
restrict_public_buckets = true
6266
}
6367

6468
data "archive_file" "lambda_zip" {

0 commit comments

Comments
 (0)