Managing Video Lifecycle in Google Cloud Storage

Setting Up Policy for Video Lifecycle Management

Question

You need to set up a policy so that videos stored in a specific Cloud Storage Regional bucket are moved to Coldline after 90 days, and then deleted after one year from their creation.

How should you set up the policy?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.

The correct answer is 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.

To explain in detail, Cloud Storage Object Lifecycle Management is a feature that can be used to automatically move or delete objects in a bucket based on certain conditions such as age, time since last modification, and storage class.

In this case, the objective is to move videos stored in a specific regional bucket to Coldline after 90 days and then delete them after one year from their creation. This can be achieved by using Age conditions with SetStorageClass and Delete actions in Cloud Storage Object Lifecycle Management.

The first step is to create a Lifecycle rule for the bucket. This can be done using the Cloud Console or the Cloud Storage JSON API. The rule should specify that it applies to objects with a specific prefix or label that identifies the videos in question.

The next step is to set the Age condition to 90 days. This means that any object that has been in the bucket for 90 days or more will be eligible for the next action in the rule, which is to set the storage class to Coldline.

The SetStorageClass action should be set to 90 days as well. This means that the object will be moved to the Coldline storage class 90 days after it was created.

Finally, the Delete action should be set to 365 days. This means that any object that has been in the Coldline storage class for one year (365 days) will be deleted from the bucket.

Option A is incorrect because the Delete action is set to 275 days instead of 365 days. Option C and D are incorrect because they use gsutil rewrite instead of Cloud Storage Object Lifecycle Management, which is a less efficient and less flexible method for managing object lifecycle.