

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Menghapus vektor dari indeks vektor
<a name="s3-vectors-delete"></a>

Anda dapat menghapus vektor tertentu dari indeks vektor dengan menentukan kunci vektor mereka menggunakan API. [DeleteVectors](https://docs.aws.amazon.com/AmazonS3/latest/API/API_S3VectorBuckets_DeleteVectors.html) Operasi ini berguna untuk menghapus data usang atau salah sambil mempertahankan sisa data vektor Anda.

## Menggunakan AWS CLI
<a name="delete-vectors-cli"></a>

Untuk menghapus vektor, gunakan contoh perintah berikut. Ganti {{user input placeholders}} dengan informasi Anda sendiri.

```
aws s3vectors delete-vectors \
 --vector-bucket-name "{{amzn-s3-demo-vector-bucket}}" \
 --index-name "{{idx}}" \
 --keys '["{{vec2}}","{{vec3}}"]'
```

## Menggunakan AWS SDKs
<a name="s3-vectors-delete-sdk"></a>

------
#### [ SDK for Python ]

```
import boto3

# Create a S3 Vectors client in the AWS Region of your choice. 
s3vectors = boto3.client("s3vectors", region_name="us-west-2")

#Delete vectors in a vector index
response = s3vectors.delete_vectors(
    vectorBucketName="media-embeddings",
    indexName="movies",
    keys=["Star Wars", "Finding Nemo"])
```

------