A developer asks for direct write access to the production database to debug an issue. What do you do?
BeginnerScenarioMulti-env and multi-account
Answer
Situation read → The need (debugging) is real; standing write access isn't the right way to meet it.
What I'd do →
- Ask what they need to see. Often a read replica, logs or a masked staging copy is enough.
- For read access: a read-only DB role, time-limited, granted through an approval flow (for example IAM database auth with a temporary role, or a tool like Teleport or StrongDM that records sessions).
- For a data fix: a reviewed SQL script run by a pipeline or a second person, with a backup or PITR point noted first.
- Log every session and review break-glass access weekly.
Why → Time-limited, recorded access meets the need without leaving a permanent hole.
Interview tip → Answer with "yes, and here's the safe path", not just "no"; it shows you enable teams.
More on Multi-env and multi-account
Design the AWS account structure for a 50-engineer startup that's growing fast.IntermediateHow do you promote the same build from dev to staging to prod?BeginnerBugs keep passing staging and appearing in production. How do you make staging closer to prod?IntermediateHow do you structure Terraform for dev, staging and prod? Workspaces, directories or Terragrunt?IntermediateDevelopers want a preview environment for every pull request. How would you build it?AdvancedHelm values files or Kustomize overlays for per-environment config?Beginner