Cloud Storage Lifecycle Management Age Conditions
Short answer
B Use Cloud Storage Object Lifecycle Management using Age conditions with SetStorageClass and Delete actions. Set the SetStorageClass action to 90 days and the Delete action to 365 days.
Question
from their creation. How should you set up the policy?
Key Takeaways
The exam traps candidates into subtracting transition days from the total retention period; the key insight is that lifecycle actions do not alter the object's creation timestamp.
This question tests the configuration of Cloud Storage Object Lifecycle Management rules for automatic storage class transitions and deletion based on object age. It establishes that deletion is calculated from the original creation date, not reset by lifecycle transitions.
Common mistake: Candidates often choose Option A because they incorrectly assume that moving an object to a different storage class via lifecycle management resets its creation date or age counter, leading them to calculate the delete action as 365 minus 90 days.
Expert Analysis
Why the Answer Is Correct
Option B is correct because Cloud Storage Object Lifecycle Management operates independently of object metadata updates like creation time. When a rule transitions an object to Coldline after 90 days, it does not rewrite the object in a way that changes its timeCreated attribute. Therefore, the deletion condition remains anchored to the original creation date, requiring a simple 365-day age condition for deletion.
Why the Other Options Are Wrong
Option A is incorrect because it assumes a recalculation of the remaining lifespan (365 - 90 = 275), which contradicts how lifecycle rules evaluate age against the creation timestamp. Options C and D are invalid because gsutil rewrite is a manual command-line tool used for immediate operations, not for setting up automated, persistent lifecycle policies on buckets.
Community Comment Notes
Community consensus strongly supports Option B, with many users noting that lifecycle transitions do not reset the creation date. As one commenter noted, "Changing Storage Class via Lifecycle Management doesn’t rewrite the object, thus its creation time stays the same." Another user clarified that you only recalculate if using specific re-write options that explicitly change metadata, which standard lifecycle rules do not.
Official Reference
https://cloud.google.com/storage/docs/lifecycle
This link opens the official vendor documentation in a new tab.
Exam Strategy
When configuring lifecycle rules, always check if the action modifies the object's creation timestamp. For standard transitions (SetStorageClass), the age counter continues from the original creation date, so deletion timers should be absolute relative to creation, not relative to the transition.
Frequently Asked Questions
Does moving an object to Coldline reset its creation date?
timeCreated metadata. The age continues to count from the original creation.Why is gsutil rewrite not suitable for this policy?
gsutil rewrite is a manual command for immediate execution. It cannot automate recurring rules like deleting objects after one year based on their age.Discussion 151 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 30 of 151
-
cloudenthu01 👍 44Correct is B. You only re-calculate expiry date when objects are re-written using re-write option to another storage class in which case creation date is rest. But in this case objects is moveed to Coldline class after 90 days and then we want to delete the object after 365 days.
-
T_T_M 👍 16You can change the storage class of an existing object either by rewriting the object or by using Object Lifecycle Management...Since Object Life cycle management was used there was no need to recalculate the expiration date and delete action still remains 365 days. https://cloud.google.com/storage/docs/storage-classes
-
yvinisiupacuando 👍 13Right answer is clearly B, "A" does not make any sense.
-
YourCloudGuru 👍 9 Answered BThe correct answer is B. Cloud Storage Object Lifecycle Management is a feature that allows you to automatically transition objects to different storage classes or delete them based on user-defined rules. To set up a lifecycle management policy to move videos to Coldline after 90 days and then delete them after one year, you would create a rule with the following conditions and actions: Condition: Age is greater than 90 days Action: Set storage class to Coldline Condition: Age is greater than 365 days Action: Delete This policy will ensure that your videos are automatically moved to Coldline after 90 days, where they will be stored at a lower cost. After one year, the videos will be automatically deleted. Here is an example of how to create a lifecycle management policy using the gcloud command-line tool: gcloud storage lifecycle management policies set my-bucket my-policy --action-set-storage-class coldline --condition-age-days 90 --action-delete --condition-age-days 365
-
lxgywil 👍 7I was wrong - the answer is indeed "B". Changing Storage Class via Lifecycle Management doesn’t rewrite the object, thus its creation time stays the same.
Show 25 more comments
-
saurabh1805 👍 7B is correct answer as you dont need to calculate expiry date, that remain same irrespective of storage class.
-
JKRowlings 👍 6The correct ans is A.
-
mlantonis 👍 6It is defenitely B
-
Buruguduystunstugudunstuy 👍 5 Answered BTo set up the policy to move videos stored in a specific Cloud Storage Regional bucket to Coldline after 90 days, and then delete them after one year from their creation, you can use Cloud Storage Object Lifecycle Management. You can configure the lifecycle rule to move objects to Coldline storage class after 90 days by setting an Age condition of 90 days and a SetStorageClass action to Coldline. Then, you can configure the rule to delete objects after one year (365 days) from their creation by setting an Age condition of 365 days and a Delete action. Therefore, Answer B is the correct answer. https://cloud.google.com/storage/docs/lifecycle https://cloud.google.com/storage/docs/lifecycle#age https://cloud.google.com/storage/docs/lifecycle#actions
-
Rakesh_SAP 👍 5 Answered BAnswer B. The catch is "then deleted after one year from their creation." https://cloud.google.com/storage/docs/lifecycle#age Age The Age condition is satisfied when an object reaches the specified age (in days). Age is measured from the object's creation time. For example, if an object's creation time is 2019/01/10 10:00 UTC and the Age condition is 10 days, then the condition is satisfied for the object on and after 2019/01/20 10:00 UTC. This is true even if the object becomes noncurrent through Object Versioning sometime after its creation.
-
JJ_ME 👍 5Answer is B. Age is measured from the object's creation time. Object Lifecycle Management does not rewrite an object when it changes the object's storage class. Therefore the object's creation time remains unchanged. https://cloud.google.com/storage/docs/lifecycle#age https://cloud.google.com/storage/docs/lifecycle#setstorageclass-cost
-
JLJD 👍 5The correct answer is A as it's a trick Q... it's one year from creation so 90 days + 275 days = 365 days
-
agrawaladi3 👍 5Option A deleted after one year from their creation. Creation 365-90
-
Gentio 👍 4First, the "Age" conditions are based on the Object
s creation time (ref.:https://cloud.google.com/storage/docs/lifecycle#age). Afterward, the objects creation time property is established when the object is added to the bucket. In other words, if you make a change on the object inside a bucket, you don't change its creation time. A: Here, we consider the object moving among buckets, which is not mentioned in the question. B: Here, we consider that the object suffers a change inside the bucket, which matches the question's perspective. C & D: You can use gsutil to do the task. However, to be productive, it should use gsutil with the lifecycle parameter. (ref.: https://cloud.google.com/storage/docs/gsutil/commands/lifecycle) Answer: B -
AltHexMax 👍 4 Answered BI was very confused at first (thought it was A) but then I saw this example on Google's Documentation: https://cloud.google.com/storage/docs/managing-lifecycles#change_an_objects_storage_class For the second condition it changes the storage class after 1095 days the object was created. If you see the instructions it does not recalculate the days, it takes the whole 1095 days.
-
darkroomie 👍 4 Answered AA is the correct answer. It clearly specifies that videos are moved to coldline after 90 days and deleted after "A YEAR OF THE CREATION" (that includes the 90 days that counts for moving to coldline. So, videos are created one day, then moved to coldline after 90 days (+90) and deleted after a year of creation (90+275=365) A IS CORRECT....!!!
-
Bobbybash 👍 4 Answered AThe correct answer is A. Lets assume the object was created January 1st 2022, after 90 days (March 31st,2022), its moved to coldline storage, and later deleted one year after creation (31st December,2022), which is April 1st to December 31st (275 days). I hope this clears the misunderstanding
-
VivekSolutionArchitect 👍 4 Answered BThe answer is clearly B. If you go to the option "Select an action" for a specific cloud storage bucket and hover on the question mark for age. It clearly says "Counted from the object's creation date(when the object was added to the current bucket)
-
PKookNN 👍 4 Answered BThe key part is "deleted after one year from their creation" - B is correct at 365 days. If A is chosen then the object would be deleted BEFORE 1 year.
-
Karthik_SIDDE 👍 4 Answered AAnswer is A. The videos are stored in GCS and moved to coldline after 90 days, then deleted after one year of their creation
-
manu202020 👍 4Delete action need to be set on creation date, and doesn't change on changing storage class.
-
jayaen 👍 4A is correct
-
JohnnyS20 👍 3Just think of it this way: It's January 1, 2020 and you were asked to move a set of files to Coldline storage after the first quarter of the year. However, your team wants to store it until December 2020 in case it'll be needed. Now you plan to set the policy to move it to Coldline storage after 3 months. To keep it there until December, you must also set deletion to take effect after 1 year or 365 days. This means the files will be deleted on January 1,2021 next year. Now if you set policy to move it to Coldline after 3months and set the deletion to take effect after 275 days, the files will defniitely be moved after March to Coldline but won't reach December because it will already be deleted on Oct 1 - which is the 276th day. The countdown for the policy to move the files to Coldline and to delete it after a year STARTS AT THE SAME TIME. Correct answer: B
-
mohdafiuddin 👍 3Correct answer in this case is B. Refer - https://cloud.google.com/storage/docs/lifecycle#age and Explanation - There are two ways of changing the storage class of an object. 1. Rewriting 2. Using the Object Lifecycle Management (src - https://cloud.google.com/storage/docs/storage-classes#key-concepts) The age of the object does not change when it is moved to a different storage using the object lifecycle management. The age is calculated from the date of creation. Since we need to move it to a different storage after 90 days from creation and delete it one year after creation, we simply need to use the numbers 90 and 365 since the date of creation (and therefore age) remains the same.
-
lxgywil 👍 3"A" is correct since modifying the Storage Class creates a new version for the object. The "creation time" reflects the time when that last version was created. Therefore, you do need to subtract those 90 days. This is pretty easy to test in the GCP Console: 1. Upload an object to a GCS bucket and see its creation time. 2. Wait for a few minutes and run
gsutil rewrite -s coldline gs://PATH_TO_OBJECT. 3. Note that the object's creation time changed. 4. Rungsutil ls -ahl gs://BUCKET_NAMEand you will note that modifying the Storage Class has created a new version for your object (which creation time is, obviously, different). -
Ravihonnagiri 👍 3Answer is definitely B SetStorageClass cost advantages Unlike changing an object's storage class manually, Object Lifecycle Management does not rewrite an object when it changes the object's storage class. This gives Object Lifecycle Management certain pricing advantages: There are no retrieval fees or early deletion fees associated with the storage class change, even when the object is originally set to Nearline Storage or Coldline Storage. The object's time spent set at the original storage class counts towards any minimum storage duration that applies for the new storage class.
-
shreykul 👍 3Why not A, I mean question states 365 days from the date of creation, and the data will be in cold-line for 90 days, 365-90=275 -> which should be set in lifeline? Am I wrong? or is the 90 days(Cold line period) is inclusive in the 365 days when creating life cylce management?
-
Jelly_Wang 👍 3The answer is B. When using Age, it is calculated from when the object is written to the bucket. The age do not get affected when you change the storage class .https://cloud.google.com/storage/docs/lifecycle#age
-
JackSkeletonCoder 👍 3 Answered Boption A can be misguiding but you don't have to specify 275 days since the rule would be implemented based on the creation of object not after the effect of the previous rule. Hence option B
-
lights4life 👍 3Answer is B. There is term called AGE, always GCP refers AGE by default which is since creation of the object.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All ACE Questions
Access 84 questions with complete answers and detailed explanations.
View Full ACE Practice Test →