skip to content

Your nightly job fails writing to another team's object store, yet the same write works from your own session — what do you check first?

level: seniorimportance: must knowfreq 58%

answer

  1. ask what it ran as first
  2. two runs, two different principals
  3. the other account's record shows the refusal
  4. if your side allows, the other side is missing
  5. no added allow helps against a deny

basics

~20 s

Check which principal the failed write actually ran as. Your session and the job are two different principals, so the grants that covered you need not cover it — and across an account boundary the store's owner must name the job's identity, which no change on your side can supply.

solid answer

~40 s

Start with the actor, not the permission. The interactive write ran as your human principal; the scheduled write ran as the job's workload principal, so they are evaluated against different grants. Read the principal off the denial and off the audit trail in the account that owns the store, then establish which of the two sides is missing. Because the store sits in another account, both sides must allow: your account has to permit the job's identity to perform the write, and the store's owner has to name that identity. If your own side already allows it, nothing you can edit will fix the call — the missing grant belongs to the other team, and widening your identity-attached permission only adds reach you did not need.

go deeper

for a junior

Know that a scheduled job and your own login are different identities, so a permission that covers you may not cover the job at all.

for a middle

Explain the two-sided requirement across an account boundary, and be able to say which of the two documents your team is actually able to edit.

for a senior

Show the diagnosis in order: read the principal from the denial and the resource owner's audit trail, eliminate the side you own, then ask for exactly the principal and action you need — and recognise the fingerprint of an explicit deny when added grants change nothing.

for a principal

Make this failure rare rather than well-diagnosed: a convention that every cross-team consumer is named as its own workload principal, and a request path that makes naming one principal easier than opening the resource broadly.

## The shape of the bug A nightly reconciliation batch owned by one team writes its output into an object store owned by another team's account. An engineer runs the same write by hand and it succeeds; the scheduled run is denied. Nothing in the code differs. This is the single most common cross-team permission failure, and it has one root cause dressed in two coats: **the two runs are not the same principal**, and **the call crosses an account boundary, so one side of the grant can only be written by somebody else**. ## Step one: name the principal, before touching any permission The interactive run was authenticated as a human principal — your login, carrying whatever your group memberships gave you. The scheduled run was authenticated as the job's workload principal. Those are different identities, so they resolve to different grants, and "it works for me" says nothing about the job. Where to read it: - The **denial itself** normally names the principal it refused and the action it refused, which is usually enough to confirm you were reasoning about the wrong actor. - The **audit trail of management and data calls in the account that owns the store** shows the refused attempt from the resource owner's side, which is the view your own account cannot give you. Until you have the principal in hand, every permission you read is a guess. ## Step two: work out which of the two sides is missing The call crosses an account boundary, so it needs both: | Side | Who can edit it | What it must say | |---|---|---| | Identity-attached, in your account | Your team | The job's principal may perform the write on that resource | | Resource-attached, on the store | The other team | That specific outside principal may write here | Now the reason your own session worked becomes visible: the store's owner had almost certainly named something that covers humans — your group, or the set of engineers — and never named the job, which did not exist when the grant was written. So the identity side is fine for you, fine for the job, and the resource side covers only one of you. The practical check is a subtraction: if your account's grant already permits the job's identity to perform the action, the missing allow is on the other side by elimination, and no edit you can make will supply it. You raise a request naming exactly the principal and the action. ## Step three: rule out a deny, not just a missing allow There is a second possible shape, and it looks identical from the outside. Instead of a missing allow, an **explicit deny** that matches the call may exist, and an explicit deny outranks every allow on either side. The tell is usually in the denial: platforms that support an explicit deny commonly distinguish it from the default refusal, and the fingerprint is that the call keeps failing no matter how much allow is added. If adding a grant changes nothing at all, stop adding grants and go looking for the deny. ## The wrong fixes, and why they are worth naming 1. **Widening your own identity-attached grant.** The instinct is to edit the side you control. Across an account boundary it cannot work, and it leaves a much broader permission behind that nobody will remember to narrow. 2. **Running the job as a human.** Making the schedule use a person's credentials makes the symptom disappear and destroys attribution, ends the moment that person leaves, and gives the batch every permission its author has interactively. 3. **Asking the other team to open the store broadly.** A grant naming everyone solves your case and every future case you did not want solved. Ask for your principal by name. ## What the interviewer is listening for That you diagnose by actor first, that you know a cross-boundary call has two owners and therefore two documents, and that you can say which one you are able to change. Candidates who have not lived this reach straight for the permission document they can edit; candidates who have, ask "what did it run as?" before they open anything.

  • The other team says they already granted access, and it still fails. What now?
    Confirm what they named. A grant that names a group of humans, an account as a whole, or a principal that no longer exists all read like 'access granted' in a ticket. Ask them to echo the principal identifier and the action, and compare it with the one in the denial, character for character.
  • Why is running the batch under an engineer's login the wrong fix even though it works?
    It destroys attribution — the audit trail now says a person acted while asleep — and it ties production to one employee, so the job breaks when they leave. It also hands the batch everything that person can do interactively, which is far more than a write into one store.
  • How would you tell a missing allow from an explicit deny?
    By the response to change. A missing allow is fixed the moment the right grant is added; an explicit deny keeps refusing however much allow you pile on, because it outranks every allow. Many platforms also mark the two differently in the denial, so read the message before you start editing.

saying these in an interview costs you the question

  • Assumes the job inherits the permissions of whoever wrote it
  • Widens their own identity-attached grant until something changes
  • Switches the schedule to run under a person's login to make it pass
  • Never establishes which principal the failed call was made as
  • Asks the other team to open the store to everyone rather than to one principal