Managing vector bucket policies
Vector bucket policies are resource-based policies that you attach directly to vector buckets to control access to the bucket and its contents. You can add, view, edit, delete vector bucket policies by using the Amazon S3 REST API, AWS SDKs, S3 Console, or the AWS Command Line Interface (AWS CLI). Bucket policies for vector buckets can grant permissions to principals from other AWS accounts, making them useful for cross-account access scenarios.
Policy management operations
-
PutVectorBucketPolicy – Add or update a bucket policy.
-
GetVectorBucketPolicy – Retrieve the current bucket policy.
-
DeleteVectorBucketPolicy – Remove the bucket policy.
Adding a vector bucket policy
Open the Amazon S3 console at https://console.aws.amazon.com/s3/
. In the left navigation pane, choose Amazon S3.
Choose Vector buckets and select the vector bucket name that you want to add a policy to.
Choose the Permissions tab.
Under Vector bucket policy, choose Edit.
In the policy editor, enter your policy JSON.
(Optional) Choose Policy examples to see sample policies that you can adapt to your needs.
After entering your policy, choose Save changes.
To add or update a bucket policy, use the following example command and
replace the user input placeholders with your own
information.
aws s3vectors put-vector-bucket-policy \ --vector-bucket-name "amzn-s3-demo-vector-bucket" \ --policy '{"Version": "2012-10-17", "Statement":[{"Effect":"Allow","Principal":{"AWS":"arn:aws:iam::111122223333:root"},"Action":"s3vectors:*","Resource":"arn:aws:s3vectors::aws-region111122223333:bucket/amzn-s3-demo-vector-bucket"}]}'
Viewing a vector bucket policy
Open the Amazon S3 console at https://console.aws.amazon.com/s3/
. In the left navigation pane, choose Amazon S3.
Choose Vector buckets and select the vector bucket name that you want to view the policy for.
Choose the Permissions tab.
To retrieve a bucket policy, use the following example command and replace the
user input placeholders with your own
information.
aws s3vectors get-vector-bucket-policy \ --vector-bucket-name "amzn-s3-demo-vector-bucket"
Deleting a vector bucket policy
Open the Amazon S3 console at https://console.aws.amazon.com/s3/
. In the left navigation pane, choose Amazon S3.
Choose Vector buckets and select the vector bucket name that you want to delete the policy for.
Choose the Permissions tab.
Under the Vector bucket policy, choose Delete.
To delete a bucket policy, use the following example command and replace the
user input placeholders with your own information.
aws s3vectors delete-vector-bucket-policy \ --vector-bucket-name "amzn-s3-demo-vector-bucket"
For detailed information about creating and managing bucket policies, including policy examples and best practices, see S3 Vectors resource-based policy examples.