put-bucket-policy

Associates a bucket policy with a bucket. For more information on the supported policy elements, see Access Control.

Usage

put-bucket-policy –bucket <value> --policy <value>

Supported Options

--bucket: Bucket name
--policy: Policy as a JSON document.

Example

aws s3api put-bucket-policy --endpoint http://<hostname>:<port_number> --profile testuser1 --bucket example_bucket --policy file://example_policy.json

Loading...