v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-14159650798.5 KB

Deletes a Amazon Lightsail bucket.

When you delete your bucket, the bucket name is released and can be reused for a new bucket in your account or another Amazon Web Services account.

post/#X-Amz-Target=Lightsail_20161128.DeleteBucket

Headers

X-Amz-Target'Lightsail_20161128.DeleteBucket' required

Request body

bucketNamestring required
<p>The name of the bucket to delete.</p> <p>Use the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetBuckets.html">GetBuckets</a> action to get a list of bucket names that you can specify.</p>
forceDeleteboolean
<p>A Boolean value that indicates whether to force delete the bucket.</p> <p>You must force delete the bucket if it has one of the following conditions:</p> <ul> <li> <p>The bucket is the origin of a distribution.</p> </li> <li> <p>The bucket has instances that were granted access to it using the <a href="https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_SetResourceAccessForBucket.html">SetResourceAccessForBucket</a> action.</p> </li> <li> <p>The bucket has objects.</p> </li> <li> <p>The bucket has access keys.</p> </li> </ul> <important> <p>Force deleting a bucket might impact other resources that rely on the bucket, such as instances, distributions, or software that use the issued access keys.</p> </important>

Response

Success