API
Storage
Storage
Chosen image
Home/Storage/Manage S3 storage/Manage buckets

Manage buckets via the Control panel

Create buckets

1. Go to the Storage section.

2. Click the ··· icon opposite the storage that you want to use for the bucket’s creations and select Buckets.

Storage

3. Click the Add new bucket button.

Add new bucket

4. Enter the bucket's name (follow the instructions below with the naming requirements) and click Create.

 Enter the bucket's name

The bucket’s creation is complete.

Naming requirements

When naming your S3 buckets, follow the requirements:

  1. Uniqueness. You must choose a unique name that doesn't repeat any existing bucket names in the Gcore S3 repository. Our system checks the names of buckets of all users. If the name matches the name of the bucket of another user, you will see the error: create bucket: bucket already exists: bad params. Try another name.

  2. DNS compliant. Do not use the following characters in the name, since they don't match DNS notation: underscores, dashes (at the end), multiple dots in a row, or a combination of dots and dashes.

  3. Lowercase. Use only lowercase in names.

  4. Length. The length must be 3–63 characters.

  5. Confidentiality. Do not include sensitive information in the bucket name as it will be visible in the URL, and attackers can take advantage of this.

Add Lifecycle policy (available for S3 in Luxembourg only)

You can configure the lifecycle policy for a bucket via the aws cli client according to the "Remove objects from a bucket automatically with AWS CLI" guide. If you use S3 storage in Luxembourg, it is possible to assign Lifecycle policy for buckets in the Control panel:

1. Open the bucket page, click the ··· icon and select Lifecycle Management.

bucket page

Note: If your S3 storage is in different locations OTHER THAN Luxembourg (e.g., Chicago, Singapore, and so on), the Lifecycle Management menu item will be absent.

2. Enter the number of days. After this time, files will be deleted from the bucket. Click Save changes.

Enter the number of days

If you want to discard the expiration time, click the Cancel policy button.

Configure HTTP access

If you want to use S3 storage as the origin for a CDN resource, you must share access to a bucket. In this case, all files from the bucket will be available via the HTTP protocol.

1. Open the bucket page, click the ··· icon and select HTTP access to all files.

Enter the number of day

2. Press Apply.

Configure HTTP access

Use File manager

File manager makes it possible to create folders and upload and delete files. You can also get S3 and HTTP/HTTPS links to files.

Override CORS for a bucket

To use File manager, you must first configure the CORS. The CORS technology makes it possible to handle requests from our domain storage.gcorelabs.com.

Note: CORS should be configured for each bucket separately.

You can configure CORS in three ways:

  • Via s3cmd according to the "Set CORS policy on a bucket via s3cmd" guide.
  • Via API according to the API docs—this way makes it possible to override CORS not only for storage.gcorelabs.com and other domains.
  • In the Control panel.

To configure CORS in the control panel:

1. Open the bucket page, click the ··· icon, and select File manager.

Open the bucket page

2. Click the Override CORS button.

Override CORS

That’s it. After this action, you should enter the Access and Secret key to log in to the File Manager. Access and Secret keys are the credentials that are generated after storage creation. We don’t keep them in our system because it’s private and secure information. If you’ve forgotten keys, generate a new one in the Storage section by pressing the ··· icon and selecting Generate new keys.

File Manager

Add a folder to a bucket

1. Open File manager.

2. Click Add folder. Enter the name of the folder and click Create.

Copy

The folder is created. After this, you can work with files.

Manage files

1. Open File manager and go to the folder where you want to upload files. You can also upload files to the bucket root.

2. Click Select files, select them from your PC, and click Upload.

Delete buckets

Files will be loaded to a folder or a bucket. Then, you can copy links to files from the bucket in different formats: in S3 to manage them via the console or terminal, and conventional HTTP/HTTPS links to view files in the browser.

To get links, check the boxes on the left of files and click Copy S3 URL or Copy URL.

Delete buckets

For example, for the file sample.txt, the links look as follows:

  • s3://s-ed1.cloud.gcore.lu/example/folder1/sample.txt
  • https://s-ed1.cloud.gcore.lu/example/folder1/sample.txt

where

  • s or https is a protocol (format)
  • s-ed1.cloud.gcore.lu is a hostname
  • example is a bucket
  • folder1 is a folder
  • sample.txt is a file name.

You can also delete files. To do this, click Delete opposite those files that you want to remove from the folder or bucket.

Delete buckets

Deletion time depends on the overall size of the files that are in the bucket.

To delete a bucket, click the ··· icon on the bucket’s page, select Delete and confirm.

Delete buckets

Was this article helpful?

Not a Gcore user yet?

Check out our Storage

Go to the product page