Sample code for 30+ languages & platforms
Lianja

S3 Delete Bucket

See more Amazon S3 Examples

Demonstrates how to delete a bucket.

Chilkat Lianja Downloads

Lianja
llSuccess = .F.

// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loHttp = createobject("CkHttp")

// Insert your access key here:
loHttp.AwsAccessKey = "ABQXXABC83ABCDEFVQXX"

// Insert your secret key here:
loHttp.AwsSecretKey = "XXXXYYYYabcdABCD12345678xxxxyyyyzzzz"

loHttp.KeepResponseBody = .T.

llSuccess = loHttp.S3_DeleteBucket("chilkattestbucket")

if (llSuccess <> .T.) then
    ? loHttp.LastErrorText
    // Also examine the error response body from AWS:
    ? loHttp.LastResponseBody
else
    ? "Bucket deleted."
endif



release loHttp