GCP Storage Classes Setup
📖 Scenario: You are managing files for a company on Google Cloud Platform (GCP). Different files need different storage classes based on how often they are accessed.Standard storage is for files accessed frequently. Nearline is for files accessed less than once a month. Coldline is for files accessed less than once a quarter. Archive is for files rarely accessed but must be kept for years.
🎯 Goal: Create a Google Cloud Storage bucket configuration that sets the storage class for files based on their access frequency.
📋 What You'll Learn
Create a dictionary called
files with file names as keys and their access frequency in days as values.Create a variable called
storage_classes that maps access frequency ranges to GCP storage classes.Write a function called
assign_storage_class that takes the access frequency and returns the correct storage class.Create a dictionary called
file_storage that assigns each file its storage class using the function.💡 Why This Matters
🌍 Real World
Cloud storage costs depend on how often data is accessed. Choosing the right storage class saves money and meets access needs.
💼 Career
Cloud engineers and architects must configure storage classes correctly to optimize cost and performance in cloud projects.
Progress0 / 4 steps