ASSOCIATE-CLOUD-ENGINEER · Question #215
You need to immediately change the storage class of an existing Google Cloud bucket. You need to reduce service cost for infrequently accessed files stored in that bucket and for all files that will b
The correct answer is B. Use the gsutil to rewrite the storage class for the bucket.. To change the storage class for both existing and future objects in a Google Cloud Storage bucket to reduce costs, use gsutil to rewrite the storage class for existing objects and set the default storage class for the bucket.
Question
Options
- AUse the gsutil to rewrite the storage class for the bucket.
- BUse the gsutil to rewrite the storage class for the bucket.
- CCreate a new bucket and change the default storage class for the bucket.
- DCreate a new bucket and change the default storage class for the bucket import the files from the
How the community answered
(26 responses)- A4% (1)
- B92% (24)
- D4% (1)
Why each option
To change the storage class for both existing and future objects in a Google Cloud Storage bucket to reduce costs, use `gsutil` to rewrite the storage class for existing objects and set the default storage class for the bucket.
This option is identical to B, describing the correct method to change storage classes for both existing and future objects using `gsutil`.
To change the storage class of existing objects in a bucket, you must use `gsutil rewrite` to re-write the objects with the new storage class, and to ensure all future objects added to the bucket adopt the desired, cost-effective storage class, you must set the default storage class for the bucket itself using `gsutil defstorageclass set`. This two-step process addresses both existing and future files efficiently.
Creating a new bucket and changing its default storage class only affects *new* objects in that *new* bucket and does not address existing files in the original bucket.
Creating a new bucket and importing files is an inefficient and potentially costly data transfer operation that doesn't directly solve changing the storage class for existing objects in place or setting the default for the original bucket.
Concept tested: Google Cloud Storage object/bucket storage class management
Source: https://cloud.google.com/storage/docs/changing-storage-classes
Topics
Community Discussion
No community discussion yet for this question.