github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/avd_docs/aws/s3/AVD-AWS-0093/Terraform.md (about) 1 2 Limit the access to public buckets to only the owner or AWS Services (eg; CloudFront) 3 4 ```hcl 5 resource "aws_s3_bucket" "example" { 6 bucket = "bucket" 7 } 8 9 resource "aws_s3_bucket_public_access_block" "good_example" { 10 bucket = aws_s3_bucket.example.id 11 12 restrict_public_buckets = true 13 } 14 15 ``` 16 17 #### Remediation Links 18 - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_public_access_block#restrict_public_bucketsĀ” 19