Back to AWS Terraform templates index <–
Amazon S3 Bucket Policy
Provides Amazon S3 Bucket Policy.
Template Locations
Online documentation
Template reference
Service description
Related AWS Resources
| Resource | Description | Automation |
|---|
module "aws_s3_bucket_policy" {
bucket = "s3-bucket_console_name"
policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicRead",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject",
"s3:GetObjectVersion"
],
"Resource": [
"arn:aws:s3:::DOC-EXAMPLE-BUCKET/*"
]
}
]
}
POLICY
}