DEV Community

Cover image for Creating a Google Cloud Storage Bucket and Uploading Files: A Step-by-Step Guide
kelvin maingi
kelvin maingi

Posted on

Creating a Google Cloud Storage Bucket and Uploading Files: A Step-by-Step Guide

Image by Freepik

Introduction:

Google Cloud Storage is a computer data storage service that stores digital data on remote servers managed by Google Cloud Platform (GCP). Data availability is ensured by the provider via internet connections. Cloud storage enables businesses to store, access, and maintain data without owning data centers, shifting costs from capital to operational. Cloud storage is scalable, allowing businesses to tailor their data footprint.
Finally, Google Cloud Storage is significant in cloud computing because it provides organizations with a flexible, scalable, and cost-effective solution for cloud data storage and management. It offers a variety of storage classes and models to accommodate various use cases.

PART 1: CREATING A BUCKET IN GOOGLE CLOUD STORAGE

Buckets are basic storage containers in Google Cloud Storage (GCS) used to organize data and control access. Unlike directories, they cannot be nested. When creating a bucket, you assign it a unique name and location. The existing bucket’s name or location cannot be changed. Instead, create a new bucket and transfer contents. There is no limit on the number of buckets, but the rate of creation/deletion is limited. Buckets are fundamental containers that hold data and enable access control in GCS.

STEP 1: Select Cloud Storage from the left navigation, click on + Create tab on the top navigation.

Creating bucket

STEP 2: Name of the bucket
Bucket names must meet the following criteria:

  • The bucket name must contain only lowercase letters, numbers, dashes, underscores, and dots (no spaces).
  • The bucket name must begin and end with a number or letter; contain 3-63 characters (up to 222 for names with dots, but each dot-separated component cannot be more than 63 characters long).
  • The bucket name cannot be an IP address in dotted-decimal notation; cannot begin with "goog" or contain "google" or close misspellings. Dotted names necessitate verification.

Name of the bucket

STEP 3: Bucket location recommendations based on requirements and workload examples:

  1. Regional: optimized latency/bandwidth, lowest storage cost, cross-zone redundancy; for analytics, backup/archive.

  2. Dual-region: optimized latency/bandwidth, cross-region redundancy; for analytics, backup/archive, disaster recovery, and cross-geography data access.

  3. Multi-region: highest availability; for content serving. Enable premium turbo replication for short/predictable RPO. Co-locate data/compute in the same region(s) to maximize performance/lower cost. Store short-lived datasets in regional locations to avoid replication charges. Multi-region storage can be cost-effective for moderate performance/ad hoc analytics workloads.

choose location

STEP 4: Choose a storage class for your data
Standard, Nearline, Coldline, and Archive are the four primary storage classes offered by Cloud Storage. The minimum storage duration, retrieval fee, and typical monthly availability vary by class.

  1. Standard storage has the highest availability and has no minimum storage duration or retrieval fees.
  2. Nearline storage has a 30-day minimum storage duration and retrieval fees.
  3. Coldline storage has a 90-day minimum storage duration and retrieval fees.
  4. Archive storage has a 365-day minimum storage duration and retrieval fees. In multi/dual-regions and regions, all classes have high availability

storage class

STEP 5:Here you choose the encryption for your data stored in the bucket.

data encryption

STEP 6:click on the + Create button to create a bucket

create bucket

STEP 7:Click on the confirm tab based on the usage intentions for the bucket.

confirm the bucket

STEP 8: Once the bucket is created it will be listed here.

bucket listed

PART 2 UPLOADING A FILE IN A BUCKET

STEP 1: click on upload files to start uploading a file.

click upload file

STEP 2: Select the file you want to upload from your local computer then click open

select file to upload

STEP 3: Once the file is uploaded to the bucket it will appear here with its details

file uploaded

Conclusion

In this comprehensive guide, I have taken you through the essential steps of creating a Google Cloud Storage bucket and uploading files to it. You've gained the knowledge and skills required to leverage the power and flexibility of Google Cloud Storage for your data storage and retrieval needs by following these step-by-step instructions.
The ability to manage and store data efficiently is a critical component of modern data-driven businesses. You have a strong and scalable solution at your disposal with Google Cloud Storage. Whether you're working on small projects or dealing with massive amounts of data, Google Cloud Storage provides the reliability, security, and accessibility you need to meet your data storage needs.
I hope this guide has empowered you to harness the capabilities of Google Cloud Storage confidently. As you embark on your data storage and management endeavors, don't hesitate to refer back to this guide for reference, and always stay curious, as the world of cloud computing and data management is ever-evolving

Top comments (0)