
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Create a Cloud Storage bucket
/ 50
Copy an object to a folder in the bucket (ada.jpg)
/ 25
Make your object publicly accessible
/ 25
Cloud Storage allows world-wide storage and retrieval of any amount of data at any time. You can use Cloud Storage for a range of scenarios including serving website content, storing data for archival and disaster recovery, or distributing large data objects to users via direct download.
In this hands-on lab you will learn how to create a storage bucket, upload objects to it, create folders and subfolders in it, and make objects publicly accessible using the Google Cloud command line.
Throughout this lab you'll be able to verify your work in the console by going to Navigation menu > Cloud Storage. You'll just need to refresh your browser after each command is run to see the new items you've created.
In this hands-on lab you will learn how to use Google Cloud command line to:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the left is the Lab Details pane with the following:
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.
Click Activate Cloud Shell at the top of the Google Cloud console.
Click through the following windows:
When you are connected, you are already authenticated, and the project is set to your Project_ID,
gcloud
is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
Output:
Output:
gcloud
, in Google Cloud, refer to the gcloud CLI overview guide.
Set the project region for this lab:
In this lab you use gcloud storage and gsutil commands.
When you create a bucket you must follow the universal bucket naming rules, below.
Bucket naming rules
Use the make bucket (buckets create
) command to make a bucket, replacing <YOUR_BUCKET_NAME>
with a unique name that follows the bucket naming rules:
This command is creating a bucket with default settings. To see what those default settings are, use the Cloud console Navigation menu > Cloud Storage, then click on your bucket name, and click on the Configuration tab.
That's it — you've just created a Cloud Storage bucket!
Note: If the bucket name is already taken, either by you or someone else, the command returns:
Creating gs://YOUR-BUCKET-NAME/...
ServiceException: 409 Bucket YOUR-BUCKET-NAME already exists.
Click Check my progress to verify your performed task. If you've successfully created a Cloud Storage bucket, you'll see an assessment score.
Below is a multiple choice question to reinforce your understanding of this lab's concepts. Answer it to the best of your ability.
Use Cloud Shell to upload an object into a bucket.
gcloud storage cp
command to upload the image from the location where you saved it to the bucket you created:You can see the image load into your bucket from the command line.
You've just stored an object in your bucket!
gcloud storage cp
command to download the image you stored in your bucket to Cloud Shell:If successful, the command returns:
You've just downloaded the image from your bucket.
gcloud storage cp
command to create a folder called image-folder
and copy the image (ada.jpg) into it:If successful, the command returns:
The image file has been copied into a new folder in your bucket.
Click Check my progress to verify your performed task. If you have successfully uploaded an object into a folder in your Cloud Storage bucket, you'll see an assessment score.
gcloud storage ls
command to list the contents of the bucket:If successful, the command returns a message similar to:
That's everything currently in your bucket.
gcloud storage ls
command, with the -l
flag to get some details about the image file you uploaded to your bucket:If successful, the command returns a message similar to:
Now you know the image's size and date of creation.
gsutil acl ch
command to grant all users read permission for the object stored in your bucket:If successful, the command returns:
Your image is now public, and can be made available to anyone.
Click Check my progress to verify your performed task. If you have successfully shared an object from your storage bucket, you will see an assessment score.
Validate that your image is publicly available.
You should see your image with the Public link box. Click the Copy URL and open the URL in a new browser tab.
Note: Who are you looking at? This is Ada Lovelace, credited with being the first computer programmer. She worked with mathematician and computer pioneer Charles Babbage, who proposed the Analytical Engine.
Her interest in the Analytical Engine lead to translating a paper on the machine by Italian mathematician Luigi Menabrea, adding her own extensive annotations. These notes are considered the first computer program - an algorithm designed to be carried out by the machine. She developed a vision of the capability of computers, going beyond number crunching, and examined how individuals and society relate to technology as a collaborative tool.
Citation: Ada Lovelace. (2015, October 22). Wikimedia Commons, the free media repository. Retrieved 08:01, May 31, 2022 from https://commons.wikimedia.org/w/index.php?title=Ada_Lovelace&oldid=176490980, .Below is a multiple choice question to reinforce your understanding of this lab's concepts. Answer it to the best of your ability.
If successful, the command returns:
You have removed public access to this object.
Below is a multiple choice question to reinforce your understanding of this lab's concepts. Answer it to the best of your ability.
gcloud storage rm
command to delete an object - the image file in your bucket:If successful, the command returns:
image-folder/
folder still exists).You created a storage bucket, organized it by creating folders and subfolders, then uploaded objects to it. You also made objects in your bucket publicly accessible using Cloud Shell.
This lab is also part of a series of labs called Qwik Starts. These labs are designed to give you a little taste of the many features available with Google Cloud. Search for "Qwik Starts" in the lab catalog to find the next lab you'd like to take!
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated October 29, 2024
Lab Last Tested October 25, 2024
Copyright 2025 Google LLC All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one