Deleting metadata tables - Amazon Simple Storage Service

Deleting metadata tables

Note

The S3 Metadata feature is in preview release for Amazon S3 and is subject to change.

If you want to delete the metadata table that you created for an Amazon S3 general purpose bucket, you can delete the metadata table from your table bucket.

Note

Before you can delete a metadata table, you must first delete the associated metadata table configuration on your general purpose bucket. For more information, see Deleting metadata table configurations.

To delete your table bucket, see Deleting table buckets and DeleteTableBucket in the Amazon S3 API Reference.

You can delete a metadata table by using the AWS Command Line Interface (AWS CLI), the AWS SDKs, or the Amazon S3 REST API.

Delete a metadata table

To run the following commands, you must have the AWS CLI installed and configured. If you don’t have the AWS CLI installed, see Install or update to the latest version of the AWS CLI in the AWS Command Line Interface User Guide.

Alternatively, you can run AWS CLI commands from the console by using AWS CloudShell. AWS CloudShell is a browser-based, pre-authenticated shell that you can launch directly from the AWS Management Console. For more information, see What is CloudShell? and Getting started with AWS CloudShell in the AWS CloudShell User Guide.

To delete a metadata table configuration by using the AWS CLI

To use the following example commands, replace the user input placeholders with your own information.

  1. Use the following command to delete the metadata table from your table bucket (for example, amzn-s3-demo-bucket):

    aws s3tables delete-table \ --table-bucket-arn arn:aws:s3tables:us-east-2:111122223333:bucket/amzn-s3-demo-bucket \ --namespace aws_s3_metadata \ --name test_metadata_table \ --region us-east-2
  2. To verify that the table was deleted, use the following command:

    aws s3tables get-table \ --table-bucket-arn arn:aws:s3tables:us-east-2:111122223333:bucket/amzn-s3-demo-bucket \ --namespace aws_s3_metadata \ --name test_metadata_table \ --region us-east-2

You can send REST requests to delete a metadata table configuration. For more information, see DeleteTable in the Amazon S3 API Reference.

You can use the AWS SDKs to delete a metadata table configuration in Amazon S3. For information, see the list of supported SDKs in the Amazon S3 API Reference.