aws s3api put-bucket-policy
Applies an Amazon S3 bucket policy to an Amazon S3 bucket. AWS CLI reference
6 options Its page in the AWS CLI reference
Options
--bucketThe name of the bucket.--checksum-algorithmIndicates the algorithm used to create the checksum for the request when you use the SDK.--confirm-remove-self-bucket-accessSet this parameter to true to confirm that you want to remove your permissions to change this bucket policy in the future.--content-md5The MD5 hash of the request body.--expected-bucket-ownerThe account ID of the expected bucket owner.--policyThe bucket policy as a JSON document.