Skip to content

Create an S3 Bucket

Introduction

Creating S3 buckets is a fundamental step in using Switch Cloud S3 for object storage. This chapter covers the bucket naming conventions, prerequisites, and the process for creating an S3 bucket using AWS CLI and Rclone.

Prerequisites

  • Obtain SCS3 credentials through the Switch Cloud Portal. Remember that each project has its own unique keys.
  • One of the S3 compatible CLI client (AWS CLI Version 2.13, Rclone) installed and configured with your SCS3 credentials. For more information about setting up your S3 compatible client credentials visit chapter User Authentication.

Bucket Naming Conventions

  • Do not put any confidential information in the name of the bucket as bucket names are public.
  • Names must be unique across all existing buckets in SCS3.
  • Must comply with DNS naming conventions.
  • Length: 3-63 characters.
  • No uppercase characters or underscores.
  • Name should start with a lowercase letter or number.
  • Can contain lowercase letters, numbers, and hyphens.
  • We recommend that you do not use periods . in bucket names

Valid bucket names examples:

  • switch-storage-bucket1
  • switchdatabucket1
  • switch-example-bucket-200

Invalid bucket names examples:

  • my_example_bucket_name (contain underscores).
  • MyExampleBucketName (contain uppercase letters).
  • my-example-bucket- (ends with a hyphen).

Create an S3 Bucket

To create a bucket run:

aws s3 mb s3://<your_bucket_name>
Example output
make_bucket: my-bucket2

To create a bucket run (no output, if successful):

rclone mkdir <s3_profile>:<your_bucket_name>

List Buckets

To verify bucket creation list buckets:

aws s3 ls
Example output
2025-03-03 13:55:06 my-bucket
2025-03-05 13:51:03 my-bucket2

To verify bucket creation list buckets:

rclone lsd <s3_profile>:
Example output
  -1 2025-03-03 13:55:06        -1 my-bucket
  -1 2025-03-05 14:44:00        -1 my-bucket2