Delete an S3 bucket
suggest changeGet-S3Object -BucketName powershell | Remove-S3Object -Force
Remove-S3Bucket -BucketName powershell -Force
To remove an S3 bucket, first remove the objects stored in it, if you have permission. The example lists the objects in the bucket and pipes them to Remove-S3Object. After the objects are gone, Remove-S3Bucket deletes the bucket. Versioned buckets also need their delete markers and old versions removed; this example does not do that.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents