Cloud Storage
GCP · 13 questions
Short notes
Key idea
Cloud Storage (GCS) holds files as objects in buckets. It's the landing zone for raw data, exports and backups: cheap, durable and reachable from every GCP service.
Syntax
gcloud storage buckets create gs://shop-raw --location=asia-south1
gcloud storage cp orders.csv gs://shop-raw/orders/2024-03-05.csv
gcloud storage ls gs://shop-raw/orders/
- Storage classes: Standard (frequent use), Nearline (monthly), Coldline (quarterly), Archive (yearly). Colder is cheaper to store, dearer to read.
- Lifecycle rules: move or delete objects by age.
- Uniform bucket-level access + IAM instead of per-object ACLs.
Example
Raw daily files land in gs://shop-raw/orders/dt=2024-03-05/. A lifecycle rule moves files older than 90 days to Coldline and deletes them after 2 years. BigQuery loads from the same path.
Traps
- There are no real folders; "folders" are just name prefixes.
- Bucket names are global and visible; don't put secrets or customer names in them.
- Public access must stay off for company data.
- Early deletion fees apply to Nearline/Coldline/Archive objects removed before their minimum period.
Want the full lesson with step-by-step examples, a project and a certificate? GCP course, ₹120 →
Questions
5 free questions- Question 1easy
Audit files must be kept for 7 years and are almost never read. Which storage class fits?
- Question 2medium
What is
orders/dt=2024-11-29/in Cloud Storage? - Question 3medium
You want raw files moved to Coldline after 90 days and deleted after 3 years, automatically. What do you use?
- Question 4medium
You store a file in Nearline and delete it after 10 days. What happens to billing?
- Question 5easy
You try to create a bucket named
landingand get an error that the name is taken. Why?
Cloud Storage
Cloud Storage
Cloud Storage
Cloud Storage
Cloud Storage
8 more questions on this topic, with hints, and tests
Sign up free for 21 days of every question and test.