Apply an Amazon S3 bucket policy to a specified bucket

aws s3api

  • Create and delete Amazon S3 buckets and edit bucket properties.
    More information: <https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/index.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

aws s3api put-bucket-policy --bucket {{bucket_name}} --policy file://{{path/to/bucket_policy.json}}

click the source code to copy install aws s3api on any operating system with command-not-found.com