Bucket Policy

This document provides instructions to manage Bucket Policy using the CLI. Additionally, these tasks can also be performed using the DCD and IONOS S3 Object Storage API.

Prerequisites:

Commands

To create a file policy.json with the JSON policy, see Examples.

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

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

Delete the bucket policy:

aws s3api delete-bucket-policy --bucket my-bucket --endpoint-url https://s3.eu-central-2.ionoscloud.com

Last updated

Revision created

commented latest release