Sample code for 30+ languages & platforms
C

S3 Create Bucket

See more Amazon S3 Examples

Demonstrates how to create a new bucket.

Chilkat C Downloads

C
#include <C_CkHttp.h>

void ChilkatSample(void)
    {
    BOOL success;
    HCkHttp http;

    success = FALSE;

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

    http = CkHttp_Create();

    // Insert your access key here:
    CkHttp_putAwsAccessKey(http,"ABQXXABC83ABCDEFVQXX");

    // Insert your secret key here:
    CkHttp_putAwsSecretKey(http,"XXXXYYYYabcdABCD12345678xxxxyyyyzzzz");

    success = CkHttp_S3_CreateBucket(http,"chilkattestbucket");

    if (success != TRUE) {
        printf("%s\n",CkHttp_lastErrorText(http));
    }
    else {
        printf("Bucket created.\n");
    }



    CkHttp_Dispose(http);

    }