Skip to content

S3tables deletion

0

Hi all,

I was testing the new s3tables feature. Therefore I created the table bucket using console. But when I am trying to delete the table using awscli (as currently it cannot be delete from console) aws command is throwing invalid command error. Can you please help me in deleting this s3table bucket. PFA the error.

Thanks, Aditya

error

asked 2 years ago636 views

2 Answers
2

I apologize for the confusion you're experiencing with deleting the S3 table bucket. It seems there might be a misunderstanding about the correct AWS CLI command to use for this operation. Let me provide you with the correct information to help you delete your S3 table bucket.

To delete an S3 table using the AWS CLI, you should use the aws s3tables delete-table command, not the aws s3 command. Here's the correct format for the command:

aws s3tables delete-table \
    --table-bucket-arn arn:aws:s3tables:region:account-id:bucket/your-table-bucket-name \
    --namespace your_namespace \
    --name your_table_name

You'll need to replace the following placeholders with your specific information:

  • region: The AWS region where your table bucket is located (e.g., us-east-1)
  • account-id: Your AWS account ID
  • your-table-bucket-name: The name of your S3 table bucket
  • your_namespace: The namespace of your table
  • your_table_name: The name of your table

Make sure you have the necessary permissions to perform this operation. You must have the s3:DeleteTableBucket permission to delete the table bucket.

If you're still encountering issues after using the correct command, please double-check that you have the latest version of the AWS CLI installed and that your AWS CLI is properly configured with the correct credentials and region.

If you prefer to delete the S3 bucket itself rather than just the table, you can use the aws s3 rb command:

aws s3 rb s3://your-bucket-name --force

Replace your-bucket-name with the actual name of your S3 bucket. The --force option will delete all objects in the bucket before deleting the bucket itself.

Remember that deleting a table or bucket is a permanent action, so please ensure you no longer need the data before proceeding.
Sources
Deleting an Amazon S3 table - Amazon Simple Storage Service
DeleteTableBucket - Amazon Simple Storage Service
Deleting the Amazon S3 buckets - Enhanced Document Understanding on AWS

answered 2 years ago

EXPERT

reviewed 2 years ago

  • I am trying to delete the s3 tables bucket. This bucket has no table or namespace in it

1

Hi,

You command is totally correct but you CLI is obsolete. S3Tables were announced last week: you need a very recent CLI to work with them

Update the CLI to the last version. To do it, follow https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

Mine is:

$aws --version
aws-cli/2.22.14 Python/3.12.8 Darwin/24.1.0 source/x86_64

Best,

Didier

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.