Skip to main content

bucket_policy

Gets an individual bucket_policy resource

Overview

Namebucket_policy
TypeResource
Descriptionbucket_policy
Idawscc.s3.bucket_policy

Fields

NameDatatypeDescription
bucketstringThe name of the Amazon S3 bucket to which the policy applies.
policy_documentobjectA policy document containing permissions to add to the specified bucket. In IAM, you must provide policy documents in JSON format. However, in CloudFormation you can provide the policy in JSON or YAML format because CloudFormation converts YAML to JSON before submitting it to IAM. For more information, see the AWS::IAM::Policy [PolicyDocument](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html#cfn-iam-policy-policydocument) resource description in this guide and [Access Policy Language Overview](https://docs.aws.amazon.com/AmazonS3/latest/dev/access-policy-language-overview.html) in the *Amazon S3 User Guide*.
regionstringAWS region.

Methods

Currently only SELECT is supported for this resource resource.

Example

SELECT
region,
bucket,
policy_document
FROM awscc.s3.bucket_policy
WHERE data__Identifier = '<Bucket>';

Permissions

To operate on the bucket_policy resource, the following permissions are required:

Read

s3:GetBucketPolicy

Update

s3:GetBucketPolicy,
s3:PutBucketPolicy

Delete

s3:GetBucketPolicy,
s3:DeleteBucketPolicy