Learning about storage and how it’s used is a pretty important step in the process of learning the cloud! In this hands-on lab, we will create a Cloud Storage bucket and folder, then upload an object to the folder and make it public.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create a Bucket
In the lab, the correct project is already selected; but in the real world, if you have multiple projects, you would want to choose the appropriate project before starting.
- From Google Cloud console’s main navigation, choose Storage.
- Click Create a Bucket.
- Give your bucket a name—it has to be globally unique—and click Continue.
- Select Region as the location type and US-Central-1 as the region, then click Continue.
- Select Standard as the storage class, then click Continue.
- Under Access Control, select fine-grained, then click Continue.
- Under Protection tools, leave the option None selected.
- Expand DATA ENCRYPTION; we will leave the Use a customer-managed encryption key (CMEK) box unchecked.
- Click Create.
- Uncheck "Enforce public access prevention on this bucket" and choose CONFIRM.
- Create a Folder, Upload an Object, and Make the Bucket Public
- Once inside the bucket, click CREATE FOLDER.
- Give your folder a name, then click Create.
- Click on your folder name hyperlink to access the folder.
- Select UPLOAD FILES and upload a sample file into your folder.
- Click on Bucket details to move back into the bucket level and out of your folder.
- Highlight your bucket and click on the three dots on the right of your bucket, then click Edit access.
- Select ADD PRINCIPAL.
- Under New principals, type in allUsers.
- Select the Cloud Storage role, and then select Storage Object Viewer.
- Click Save, then click Allow Public Access.