Linux command
aws-s3-rb 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Delete an empty S3 bucket
aws s3 rb s3://[bucket-name]
Force delete a bucket
aws s3 rb s3://[bucket-name] --force
Delete a bucket in a specific region
aws s3 rb s3://[bucket-name] --region [us-east-1]
说明
aws s3 rb (remove bucket) deletes an S3 bucket. By default, the bucket must be completely empty of objects before it can be deleted. Use the --force option to automatically delete all non-versioned objects in the bucket before removing the bucket itself. This is a destructive operation that cannot be undone.
参数
- S3Uri
- The S3 URI of the bucket to delete (s3://bucket-name)
- --force
- Delete all objects in the bucket before deleting the bucket itself
FAQ
What is the aws-s3-rb command used for?
aws s3 rb (remove bucket) deletes an S3 bucket. By default, the bucket must be completely empty of objects before it can be deleted. Use the --force option to automatically delete all non-versioned objects in the bucket before removing the bucket itself. This is a destructive operation that cannot be undone.
How do I run a basic aws-s3-rb example?
Run `aws s3 rb s3://[bucket-name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does S3Uri do in aws-s3-rb?
The S3 URI of the bucket to delete (s3://bucket-name)