Data Source: aws_s3_bucket_policy

The bucket policy data source returns IAM policy of an S3 bucket.

Example Usage

The following example retrieves IAM policy of a specified S3 bucket.

data "aws_s3_bucket_policy" "example" {
  bucket = "example-bucket-name"
}

output "foo" {
  value = data.aws_s3_bucket_policy.example.policy
}

Argument Reference

This data source supports the following arguments:

Attribute Reference

This data source exports the following attributes in addition to the arguments above: