Managing vector bucket policies - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Managing vector bucket policies

Note

Amazon S3 Vectors is in preview release for Amazon Simple Storage Service and is subject to change.

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. Bucket policies for vector buckets can grant permissions to principals from other Amazon accounts, making them useful for cross-account access scenarios.

Policy management operations

Adding a vector bucket policy

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-region:111122223333:bucket/amzn-s3-demo-vector-bucket"}]}'

Viewing a vector bucket policy

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

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.