You need an All Access Membership on GCP Study Hub to access labs. Click here to purchase if you don't have one.
In this lab, you'll learn how to create a Cloud Storage bucket in Google Cloud Platform and upload files to it. Cloud Storage buckets are containers for storing objects (files) in the cloud with high durability and availability.
gcp-lab-bucketus-central1 regionfolder1 and upload a file inside itHow this works: You need a Google account that uses the same email address as your GCP Study Hub account. When you sign into that Google account, the system will be able to grant you temporary access to a GCP project when you start the lab.
Click the button below to start your lab:
Start LabOnce your lab starts, use the "Open Lab in GCP Console" button from the lab portal to open the Google Cloud Console with your temporary lab project already selected.
Alternatively, you can search for "Cloud Storage" in the search bar at the top.
First, download the sample text file to your computer that you'll upload to your bucket.
Note: The file will be saved to your Downloads folder. Remember where it's located - you'll need it in Step 8!
gcp-lab-bucketgcp-lab-bucket-12345This lab requires us-central1 specifically, and the checker will verify it. Location cannot be changed after a bucket is created, so if you pick the wrong one you will need to delete the bucket and start again.
Your lab project also sits under an organization policy that limits which regions can be used at all. Real companies do this for cost and data residency reasons, and it is why some regions you might expect to see are unavailable.
Before you move on, click Nearline, Coldline and Archive one at a time and watch the price change in the "Good to know" panel on the right. Archive stores data for a fraction of what Standard costs, but colder classes charge more to read your data back, and bill a minimum storage duration whether you keep the file that long or not. That's why Standard is the right default for data you're actively using. Set it back to Standard before continuing.
gcp-lab-bucketus-central1Your bucket is not created until you click CONFIRM. If you clicked CREATE and nothing seems to be happening, look for this dialog. It's the most common place people get stuck.
sample_upload_file.txt file you downloaded in Step 3sample_upload_file.txt listed in the bucketTip: You can also drag and drop the file directly into the browser window to upload it.
Real projects put thousands of objects in one bucket, so you need a way to organize them. Cloud Storage lets you create folders, but they don't work the way folders on your computer do.
folder1 for the name and click Createfolder1/ with a trailing slash, the Type column says Folder, and Size, Created and Last modified are all blankfolder1/ to open it, then click UPLOAD FILES and upload sample_upload_file.txt agaings://your-bucket-name/folder1/sample_upload_file.txtWhat just happened: there are no folders in Cloud Storage. Every bucket is one flat list of objects. What you created was a placeholder, and the file you uploaded is a single object whose name is folder1/sample_upload_file.txt. The slash is just a character in the name. The console reads those slashes and draws a folder tree so it feels familiar, but nothing underneath is nested.
This matters when you start scripting against Cloud Storage. Tools filter objects by name prefix, not by directory, which is why the object list has a Filter by name prefix only option rather than a folder picker.
Click the button below to open the lab checker in a new window. Sign in with Google to verify your work and get your completion token.
Open Lab CheckerPaste your token below and click Validate. If valid, a button will appear to mark the lesson complete.
If your validation fails, check that:
gcp-lab-bucket (not just contains it)us-central1 (not us-central or us-west1)folder1, and you opened it and uploaded a file inside it. Creating the folder on its own is not enough, because an empty folder is only a placeholder and contains no file