All jobs / DevOps / SRE / cloud
DevOps / SRE / cloud interview question · 1–3 years
A service on a VM needs to read from a storage bucket. How does it get permission?
The strongest answer
Attach a role to the instance with a policy scoped to that bucket; the SDK picks up temporary credentials from the instance metadata, and nobody ever creates or stores an access key
Why it works
Exactly. Instance roles are the pattern; keys on disks are the breach.
What a good answer covers
- Instance or workload role, scoped to the resource.
- Temporary credentials from metadata.
- No access keys on machines.
- Least privilege on the policy.
Answers that fall short
- Close, but not the strongest: Create an access key for a user and put it in the app's config
Long-lived keys leak in configs, images and logs, and rotating them is a project. - Weak: Make the bucket public for simplicity
Public is not permission; it is exposure. - Red flag: Embed the key in the machine image
Images are copied and shared; the key goes with them.
Who gets asked this
- Backend developer
- Full-stack developer
- DevOps / SRE / cloud
- Data engineer
- Cybersecurity
- Solutions / cloud architect
More DevOps / SRE / cloud questions
- Design a rate limiter: which algorithm and where does its state live?
- Active-passive versus active-active across regions — what does active-active cost you beyond money?
- A hot cache key expires and 5,000 requests miss at once. Design against it.
- How do you limit the blast radius of a failure in a system serving millions?
- Your DR runbook is a document. How do you make it real?
- A user has an allow policy for an action and their group has a deny for it. What happens?
- URL shortener: how do you generate the short code?