Google Cloud Storage free: How to setup

In this tutorial, I will show you step by step to setup Google Cloud Storage for free.

Related Post: Google Cloud Storage with Node.js: File Upload example


Google Cloud Storage overview

Google Cloud Storage is file storage web service for storing and accessing data on Google Cloud Platform infrastructure.

It is an Infrastructure as a Service (IaaS), comparable to Amazon S3.
It has both performance and scalability of Google’s cloud with sharing capabilities and advanced security.

Google Cloud Storage stores objects into buckets. All requests are authorized using Identity and Access Management (IAM) policies or access control lists (ACLs) associated with a user or service account.

Here are some more salient features:

  • Interoperability with other cloud storage tools and libraries that work with services such as Amazon S3 and Eucalyptus Systems.
  • Consistency: strong read-after-write consistency for all upload operations.
  • Access Control: access control lists (ACLs) to manage object and bucket access. An ACL consists of one or more entries, each granting a specific permission to a scope. Permissions define what someone can do with an object or bucket (for example, READ or WRITE). Scopes define who the permission applies to.
  • Resumable Uploads: allows users to resume upload operations after a communication failure has interrupted the flow of data.

Get started

First we need to open browser with url: https://cloud.google.com/gcp/, login Google account and click on Get started for free.

google-cloud-storage-free-setup-get-started

Then we accept the Terms and click on Continue button.

google-cloud-storage-free-setup-terms

Browser will direct you to step 2.

Setup Payment method for Google Cloud Storage

Let’s choose Individual for Account type and fill in the blanks in Payment method section.

google-cloud-storage-free-setup-payment-method

Click on START MY FREE TRIAL.
Don’t be afraid because Google won’t charge you after trial time.

google-cloud-storage-free-setup-payment-safe

This is the welcome message:

google-cloud-storage-free-setup-success

Create a new Cloud Storage Project

Look at the navigation bar on the top of page, you can see My First Project that is automatically created by Google Cloud Storage.

Click on it, then NEW PROJECT.

google-cloud-storage-free-setup-create-new-project

Type the Project name, then click on CREATE button.

google-cloud-storage-free-setup-create-project

Now we’re gonna click on existing Project: My First Project again, then choose the project that we has just created above:

google-cloud-storage-free-setup-select-project

Create Google Cloud Storage Bucket

On Navigation Menu, choose Cloud Storage.

google-cloud-storage-free-setup-open-storage

Browser will turn into Project details page, let’s click on CREATE BUCKET.

google-cloud-storage-free-setup-create-bucket

Follow step by step to configure the bucket before it is created:
– Name the bucket:

google-cloud-storage-free-setup-name-bucket

– Choose where to store the bucket:

google-cloud-storage-free-setup-choose-region

– Choose storage class:

google-cloud-storage-free-setup-choose-storage-class

– Choose access Control:

google-cloud-storage-free-setup-choose-access-control

For more details about each kind, please visit:

In this tutorial, we choose Fine-grained because we want to dynamically change Permission to a given object in the bucket.

– Choose encryption type:

google-cloud-storage-free-setup-encryption-type

Let’s click on CREATE button to finish the setup.

The process is done and turn into Bucket Details page.

google-cloud-storage-free-setup-bucket-details

Now you can work with the bucket.

How to get GCP credentials JSON

Open https://console.cloud.google.com/home/dashboard, select your project (BezKoder Project for example).

Then open left menu > IAM & Admin > Service Accounts.

google-cloud-storage-get-credentials-json-service-account-select

Click on CREATE SERVICE ACCOUNT.

Next, type your Service account name and modify Service account ID.

google-cloud-storage-get-credentials-json-create-service-account-name

Click on CREATE button.

This step is optional, you can set specific actions on the resources of the Project with Role and Condition.

google-cloud-storage-get-credentials-json-create-service-account-access

And grant users access to this service account (optional).

google-cloud-storage-get-credentials-json-create-service-account-user-access

After all, click on DONE button.
The service account is created successfully, but without key.

google-cloud-storage-get-credentials-json-create-service-account-no-keys

Click on the email above to open Service account details.

google-cloud-storage-get-credentials-json-create-service-account-keys

Choose the KEYS tab and ADD KEY button to Create new key.

google-cloud-storage-get-credentials-json-add-key

A popup will appear, choose the Key type as JSON and click on CREATE.

google-cloud-storage-get-credentials-json-key-type

The file will be stored in your computer with success message.

google-cloud-storage-get-credentials-json-success

What’s Next

References

Leave a Reply

Your email address will not be published. Required fields are marked *