跳至內容

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

已提問 2 年前檢視次數 646 次

2 個答案
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

已回答 2 年前

專家

已審閱 2 年前

  • 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

專家

已回答 2 年前

專家

已審閱 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。