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

Deploy Brinjel on Clever Cloud

Brinjel is an open-source field management software designed for market gardeners, helping them plan seasons, track harvests, and optimize agricultural production. Created by and for market gardeners, it emphasizes an intuitive interface and features tailored to real-world needs.
Company

Simplify the management of Clever Cloud services via Kubernetes with our new operator

For the past two years, we've been enabling our customers to combine the ease of deployment of Clever Cloud with an existing Kubernetes infrastructure through an operator.
Engineering

Keycloak as a Service: identity management without the complexity

Ensuring identification and access management (IAM) in an application is a challenge that is as strategic as it is complex. But beyond the initial configuration, it is the maintenance, updates and supervision of the solution that most mobilise your teams. What if you could concentrate on your applications... while a managed solution took care of the rest?
Company