Sample code for 30+ languages & platforms
Dart

S3 Create Bucket

See more Amazon S3 Examples

Demonstrates how to create a new bucket.

Chilkat Dart Downloads

Dart
import 'package:chilkat/chilkat.dart';

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

  final http = CkHttp();

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

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

  try {
    http.s3CreateBucket('chilkattestbucket');
    print('Bucket created.');
  } on ChilkatException catch (e) {
    print(e.lastErrorText);
  }
}