S3 Storage “Clever Cloud Cellar” Emerges from Beta

Storing files and assets on Clever Cloud just got easier. After a year of beta testing, we’re proud to release Cellar: a S3-compatible file storage API.

Cellar is faster, cheaper and more reliable thanks to its distributed architecture.

If you’re using FS buckets or storing files in your database, switching to Cellar will make your life easier: files can be directly uploaded to and downloaded from Cellar, without ever going through your application. This way you can handle large files without a hassle.

Cellar is perfect for:

  • user avatars
  • large files (images, videos)

Pricing

Storage

  • First 100MB Free
  • First 1TB € 20.48 / TB / mo
  • First 25TB € 15.36 / TB / mo
  • First 50TB € 10.24 / TB / mo

Traffic (outbound)

  • First 100MB Free
  • First 10TB € 0.09 / GB / mo
  • First 40TB € 0.07 / GB / mo

Getting started with Cellar and s3cmd

Create a new Cellar addon in the Clever Cloud console. From the addon dashboard, you will be able to get your access credentials, as well as to download a s3cmd configuration file to manage your files on Cellar.

Create a bucket

In cellar, files are stored in buckets, accessible under bucket-name.cellar.services.clever-cloud.com. To start using cellar, you first have to create a bucket for your files.

You can create a bucket with s3cmd (make sure you have saved the s3cmd configuration file under ~/.s3cfg).

s3cmd mb s3://my-bucket

Upload a file

# private file
s3cmd put my-private-file.jpg s3://my-bucket/my-private-file.jpg

# publicly accessible file
s3cmd put -P my-public-file.jpg s3://my-bucket/my-public-file.jpg

Using Cellar from Node JS

You can use Cellar from any S3-compatible SDK (including the official AWS SDKs) or directly through its REST API.

require fs from 'fs';
require AWS from 'aws-sdk';

// Initialize Cellar Credentials
AWS.config.update({accessKeyId: '<access key>', secretAccessKey: '<access secret>'});
const ep = new AWS.Endpoint('cellar.services.clever-cloud.com');
const s3 = new AWS.S3({ endpoint: ep });


// Upload a file to Cellar
const body = fs.createReadStream('./my-file.jpg');
s3.putObject({Bucket: 'my-bucket', Key: 'my-file.jpg', Body: body}, (err, data) => {
  if (err) console.error(err);
  else console.log("Successfully uploaded data to my-bucket/my-file.jpg");
});

// Get an access URL for a private file
s3.getSignedUrl('getObject', {Bucket: 'my-bucket', Key: 'my-private-file'}, (err, url) => {
  if(err) console.log(err);
  else console.log("The URL is", url);
});

More information

Clever Cloud Cellar is backed by the rock solid Riak Simple Storage (aka Riak S2) from Basho.

Talk about cloud file storage: slides from our CTO Documentation: www.clever-cloud.com/doc/addons/cellar/

Using Cellar from Node.js with AWS SDK: SDK documentation

Cellar's S3 compatible API: Riak S2 API documentation

Blog

À lire également

Autumn-Winter 2024 events

For this autumn-winter 2024 season, Clever Cloud continues to participate in various trade shows and conferences.
Company Event

Clever Cloud joins Hexatrust

Clever Cloud recently joined Hexatrust, in line with its commitment to security in the cloud, and the importance of creating and supporting French and European digital ecosystems.
Company

Azimutt on Clever Cloud: easily view and manage your SQL databases

Simply creating databases is great, but being able to explore, analyze and manage them in a user-friendly interface is even better. With this in mind, we worked with Loïc Knuchel to integrate Azimutt on Clever Cloud.
Company