CloudAcademy

Working with Google Cloud Storage from the Command Line

The hands-on lab is part of this learning path

Lab Steps

keyboard_tab
lock
Signing In to Google Cloud Console
lock
Starting a Google Cloud Shell
lock
Creating a Cloud Storage Bucket with gsutil
lock
Uploading Files to Cloud Storage with gsutil
lock
Understanding Object Versioning with gsutil

Ready for the real environment experience?

DifficultyIntermediate
Duration30m
Students58

Description

Lab Overview

The gsutil component of the Google Cloud Software Developer Kit (SDK) provides a command line interface (CLI) to working with Google Cloud Storage. In contrast to using the Cloud Console to work with Cloud Storage, the CLI is ideal for automating workflows. As you will see in this Lab, gsutil is capable of doing everything that you can do in the Console and much more. 

In this Lab, you will use Google Cloud Shell, which comes with gsutil pre-installed and ready to use. You will first learn how to create buckets and different methods for transferring files to Google Cloud Storage using gsutil. Lastly, you will explore Cloud Storage object versioning and see how to configure Object Lifecycle Management to control costs when versioning is enabled on a bucket.

Lab Objectives

Upon completion of this Lab you will be able to:

  • Use and explain what Google Cloud Shell is
  • Use gsutil to perform a variety of Cloud Storage operations including creating buckets, transferring files, and performing diagnostic tests
  • Change to the storage class of individual objects in a Cloud Storage bucket with gsutil
  • Enable object versioning on buckets with gsutil
  • Configure Object Lifecycle Management to control additional costs associated with object versioning

Lab Prerequisites

You should be familiar with:

  • Working at the command line in Linux
  • Basic Google Cloud Storage Concepts

The following Labs are recommended for satisfying the prerequisites:

Environment before
PREVIEW
arrow_forward
Environment after
PREVIEW

About the Author

Students10813
Labs70
Courses7
Learning paths4

Logan has been involved in software development and research since 2007 and has been in the cloud since 2012. He is an AWS Certified DevOps Engineer - Professional, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), and Linux Foundation Certified System Administrator (LFCS). He earned his Ph.D. studying design automation and enjoys all things tech.