Creating a Bucket

You can create a bucket to store your objects. The storage is not time-restricted and is available at any time.

You can set permissions for other users to access your buckets and your objects, or make them public using an Access Control List (ACL). For more information, see Access Control List (ACL) Reference.

Ensure not to set public read permissions for your sensitive data.

You can enable the versioning of the bucket. You can then retrieve and download any version of an object. For more information, see About OOS > Objects and Enabling or Disabling Bucket Versioning.

Creating a Bucket Using AWS CLI (s3api)

Before you begin: Install and configure AWS CLI and set up your profile. For more information, see Installing and Configuring AWS CLI.

To create a bucket, use the create-bucket command following this syntax:

Request sample
$ aws s3api create-bucket \
    --profile YOUR_PROFILE \
    --bucket BUCKET \
    --acl private \
    --grant-full-control "id=USER_ID, id=USER_ID" \
    --grant-read "id=USER_ID, id=USER_ID" \
    --grant-read-acp "id=USER_ID, id=USER_ID" \
    --grant-write "id=USER_ID, id=USER_ID" \
    --grant-write-acp "id=USER_ID, id=USER_ID" \
    --no-object-lock-enabled-for-bucket \
    --endpoint https://oos.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • bucket: The name you want to give to your bucket, according to the corresponding naming rules. For more information, see About OOS.

    • When specifying new permissions, all the previous permissions are replaced. Therefore, you need to specify both the existing permissions that you want to keep (including for yourself) and the new permissions that you want to give in a single command.

    • If you are the owner of the bucket, you can lose your own permissions but not the ability to manage the ACL itself.

    For more information about existing permissions, see Getting Information About a Bucket ACL and Getting Information About an Object ACL.

  • (optional) acl: The permissions for your bucket (private | public-read | public-read-write | authenticated-read).

If you do not specify a permission for your bucket upon creation, it will automatically be set to private

  • (optional) grant-full-control: One or more IDs of users to whom you grant the full-control permission.

  • (optional) grant-read: One or more IDs of users to whom you grant the read permission.

  • (optional) grant-read-acp: One or more IDs of users to whom you grant the read-acp permission.

  • (optional) grant-write: One or more IDs of users to whom you grant the write permission.

  • (optional) grant-write-acp: One or more IDs of users to whom you grant the write-acp permission.

  • (optional) object-lock-enabled-for-bucket or no-object-lock-enabled-for-bucket: Specifies whether you want to enable Object Lock. For more information, see Configuring a Default Object Lock on Your Bucket.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The bucket is created.

Creating a Bucket Using AWS CLI (s3)

Before you begin: Install and configure AWS CLI and set up your profile. For more information, see Installing and Configuring AWS CLI.

To create a bucket, use the mb command following this syntax:

$ aws s3 mb s3://YOUR_BUCKET \
    --profile YOUR_PROFILE \
    --debug \
    --endpoint https://oos.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • s3://YOUR_BUCKET: The name you want to give to your bucket, according to the corresponding naming rules. For more information, see About OOS.

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) debug: When included, returns the detailed log of the operation. This is useful to analyze and troubleshoot issues you may be encountering.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

Creating a Bucket Using s3cmd

Before you begin: Install and configure AWS CLI and set up your profile. For more information, see Installing and Configuring AWS CLI.

You can manage your object storage resources using s3cmd commands. For more information, see s3cmd.

Related Pages

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.