Bucket Policy
This document provides instructions to manage Bucket Policy using the command-line tool. Additionally, these tasks can also be performed using the web console and IONOS S3 Object Storage API.
Commands
To create a file policy.json
with the JSON policy. For more information, see Bucket Policy Examples.
To apply a bucket policy to a bucket:
aws s3api put-bucket-policy --bucket my-bucket --policy file://policy.json --endpoint-url https://s3-eu-central-2.ionoscloud.com
To save a bucket policy to file:
aws s3api get-bucket-policy --bucket my-bucket --endpoint-url https://s3-eu-central-2.ionoscloud.com > policy.json
To delete the bucket policy:
aws s3api delete-bucket-policy --bucket my-bucket --endpoint-url https://s3-eu-central-2.ionoscloud.com
Last updated
Was this helpful?