Deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.
Related Resources
CreateBucket
DeleteObject
Use a bare-bones client and the command you need to make an API call.
import { S3Client, DeleteBucketCommand } from "@aws-sdk/client-s3"; // ES Modules import // const { S3Client, DeleteBucketCommand } = require("@aws-sdk/client-s3"); // CommonJS import const client = new S3Client(config); const command = new DeleteBucketCommand(input); const response = await client.send(command);
DeleteBucketCommandInput for command's input shape.
input
DeleteBucketCommandOutput for command's response shape.
response
config for S3Client's config shape.
config
Deletes the S3 bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.
Related Resources
CreateBucket
DeleteObject
Use a bare-bones client and the command you need to make an API call.
import { S3Client, DeleteBucketCommand } from "@aws-sdk/client-s3"; // ES Modules import // const { S3Client, DeleteBucketCommand } = require("@aws-sdk/client-s3"); // CommonJS import const client = new S3Client(config); const command = new DeleteBucketCommand(input); const response = await client.send(command);
DeleteBucketCommandInput for command's
input
shape.DeleteBucketCommandOutput for command's
response
shape.config for S3Client's
config
shape.