Buckets. Manage buckets via the control panel

Create buckets
Add Lifecycle policy (S3 Luxembourg)
Configure HTTP access
Use File manager
• Override CORS
• Add a folder
• Manage files
Delete buckets

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.

2. Click the Add new bucket button.

3. Enter the name of the bucket and click Create.

Note. The name must be unique. 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 exist: bad params.

The bucket’s creation is complete.

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 ‎“Lifecycle policy. Delete objects from the bucket automatically”‎ 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.

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.

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.

2. Press Apply.

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:

To configure CORS in the control panel:

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

2. Click the Override CORS button.

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.

Add a folder to a bucket

1. Open File manager.

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

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.

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.

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

  • s3 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.

Was this article helpful?
Recently viewed articles