Associate Data Practitioner free question 9 / 10 · Domain 4: Data Management
For a bucket that holds sensitive data, you want to stop it from being exposed to the public by mistaken grants to principals such as allUsers. Which feature corresponds directly?
- Enable object generation numbers
- Set the storage class of the bucket to Archive
- Extend the deletion time of the lifecycle rule
- Enforce public access prevention
Show the answer and explanation
Answer: D
Why this is correct
The "Overview" section of the Public access prevention page says: "When you enforce public access prevention, no one can make data in applicable buckets public through IAM policies or ACLs." It restricts access through public principals, which defends against a mistaken public setting.
Why the other options are wrong
"Enable object generation numbers" … Generation information identifies versions of an object. It does not prevent access by public principals.
"Set the storage class of the bucket to Archive" … Even a class meant for infrequent access has a separate question of public exposure, so the storage class by itself does not prevent it.
"Extend the deletion time of the lifecycle rule" … This keeps data for longer. It is not a mechanism that prevents permissions from being applied to public principals.
Key point
Combine public access prevention with permission management for authenticated principals. Even when a bucket is not public, check that you have not allowed access to a group broader than necessary.