Sample code for 30+ languages & platforms
Swift

S3 Create Bucket

See more Amazon S3 Examples

Demonstrates how to create a new bucket.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    var success: Bool = false

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

    let http = CkoHttp()!

    // Insert your access key here:
    http.awsAccessKey = "ABQXXABC83ABCDEFVQXX"

    // Insert your secret key here:
    http.awsSecretKey = "XXXXYYYYabcdABCD12345678xxxxyyyyzzzz"

    success = http.s3_CreateBucket(bucketName: "chilkattestbucket")

    if success != true {
        print("\(http.lastErrorText!)")
    }
    else {
        print("Bucket created.")
    }


}