Skip to main content

Command Palette

Search for a command to run...

Secure a Public Storage Bucket - gcloud (Solution)

Updated
1 min read
Secure a Public Storage Bucket - gcloud (Solution)
D

A passionate full-stack developer from @ePlus.DEV

Overview

  • Labs are timed and cannot be paused. The timer starts when you click Start Lab.

  • The included cloud terminal is preconfigured with the gcloud SDK.

  • Use the terminal to execute commands and then click Check my progress to verify your work.

Challenge scenario

  • You're a cloud architect for a media company. A critical video archive bucket named qwiklabs-gcp-01-bfbfad5afdd7-urgent has mistakenly been made public. Your task is to quickly secure it in the provided time frame.

Click Check my progress to verify the objective.

Make the media archive folder private.


Solution of Lab

curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/Secure%20a%20Public%20Storage%20Bucket%20-%20gcloud/lab.sh
source lab.sh

Script Alternative

Replace [Bucket-name]

gsutil iam ch -d allUsers:objectViewer gs://[Bucket-name]
gsutil iam get gs://[Bucket-name]

Tip & Tricks

Part 1 of 50

Quick and practical tips to help users optimize tasks, improve skills, and solve common problems effectively across various areas like tech, lifestyle, productivity, and more.

Secure a Public Storage Bucket - gcloud (Solution)