teluzia.Cloud Engineer · Day 150
CHAPTER 22 · TROUBLESHOOTING AND BEHAVIOURAL INTERVIEWS

IAM and DNS failures

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

IAM authorization is today's starting point. A user authenticates successfully but s3:GetObject fails on one resource. Check the action/resource pair, applicable conditions and explicit denies; adding an unrelated permission does not resolve that request. You will connect this with dns diagnosis and cross-layer reasoning. The lesson's artifact brings these decisions together: Classify six synthetic AccessDenied, NXDOMAIN, timeout and stale-address cases; write the next discriminating check and expected evidence.

Think of it this way

DNS supplies an address, while IAM checks the visitor's permission at the door; a correct address does not authorize entry.

TOPIC 01 / 03Step by step

IAM authorization

A request needs applicable permissions and must survive explicit denies and other policy boundaries. Verify action, resource and condition context; authentication success is not authorization success. A user authenticates successfully but s3:GetObject fails on one resource. Check the action/resource pair, applicable conditions and explicit denies; adding an unrelated permission does not resolve that request.

WORKED EXAMPLE
A user authenticates successfully but s3:GetObject fails on one resource. Check the action/resource pair, applicable conditions and explicit denies; adding an unrelated permission does not resolve that request.

A principal is the requesting identity; an action names the requested operation; a condition restricts when a permission applies. Imagine a role can list a bucket but cannot read its objects. These are different action/resource relationships, so listing success does not prove object access. Identify the exact denied request, applicable identity and resource policies and relevant condition context. Explicit denies and additional boundaries can override an apparent allow. Use a narrowly scoped test or policy evaluation where authorized rather than adding administrator access. Least privilege makes permission debugging more deliberate but reduces the damage of mistakes or compromise. State which policy evaluation you verified and which organization, session or resource boundaries remain unknown, then test the intended allowed operation and a deliberately unsupported one separately.

Why this matters

Check the action/resource pair, applicable conditions and explicit denies; adding an unrelated permission does not resolve that request.

A common trap

Authentication success automatically authorizes every action.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

IAM authorization

A request needs applicable permissions and must survive explicit denies and other policy boundaries. Verify action, resource and condition context; authentication success is not authorization success. A user authenticates successfully but s3:GetObject fails on one resource. Check the action/resource pair, applicable conditions and explicit denies; adding an unrelated permission does not resolve that request.

WORKED EXAMPLE
A user authenticates successfully but s3:GetObject fails on one resource. Check the action/resource pair, applicable conditions and explicit denies; adding an unrelated permission does not resolve that request.

A principal is the requesting identity; an action names the requested operation; a condition restricts when a permission applies. Imagine a role can list a bucket but cannot read its objects. These are different action/resource relationships, so listing success does not prove object access. Identify the exact denied request, applicable identity and resource policies and relevant condition context. Explicit denies and additional boundaries can override an apparent allow. Use a narrowly scoped test or policy evaluation where authorized rather than adding administrator access. Least privilege makes permission debugging more deliberate but reduces the damage of mistakes or compromise. State which policy evaluation you verified and which organization, session or resource boundaries remain unknown, then test the intended allowed operation and a deliberately unsupported one separately.

Why this matters

Check the action/resource pair, applicable conditions and explicit denies; adding an unrelated permission does not resolve that request.

A common trap

Authentication success automatically authorizes every action.

DNS diagnosis

Separate name resolution from service reachability. Compare authoritative records, resolver answers and TTL behavior; cached old records can persist after the correct record is changed. An authoritative record changed from A to B, but a resolver still serves A within TTL. Compare resolver answers with authoritative data; lowering TTL after caching cannot retroactively expire the old entry.

WORKED EXAMPLE
An authoritative record changed from A to B, but a resolver still serves A within TTL. Compare resolver answers with authoritative data; lowering TTL after caching cannot retroactively expire the old entry.

An authoritative server holds the zone's record; a recursive resolver answers using lookup and cache; time-to-live controls how long a cached answer may be reused. Imagine only some clients reach the new endpoint after a record update. Compare resolver choice and cached answers, and distinguish that propagation behavior from an incorrect authoritative record. NXDOMAIN, SERVFAIL and timeout are different observations and require different next checks. A private name may resolve only inside the intended network context, so a public-laptop test is not universal evidence. Lower TTL can improve future agility but raises query load and does not instantly purge old cached responses. Check name resolution separately from TCP, TLS and application behavior so a correctly resolved but unavailable endpoint is not mislabeled a DNS failure.

Why this matters

Compare resolver answers with authoritative data; lowering TTL after caching cannot retroactively expire the old entry.

A common trap

Changing authoritative DNS instantly updates every resolver cache.

Cross-layer reasoning

An application may surface an access failure as a generic connection error. Record exact response codes and resolved addresses before deciding whether IAM or DNS is responsible. NXDOMAIN means name resolution failed, whereas AccessDenied means a service evaluated authorization. Preserve the exact service response and resolved endpoint instead of grouping both as 'network issues.'

WORKED EXAMPLE
NXDOMAIN means name resolution failed, whereas AccessDenied means a service evaluated authorization. Preserve the exact service response and resolved endpoint instead of grouping both as 'network issues.'

A discriminating test separates hypotheses; a response layer identifies which component produced an error; a dependency chain shows how failures are translated upward. Imagine an application reports a generic storage connection failure. Capture the underlying response: AccessDenied supports authorization investigation, name lookup failure supports DNS investigation and a transport timeout keeps routing or service availability open. Ask whether the app retries or rewrites errors, because its top-level message may conceal useful detail. Compare the same endpoint and identity rather than testing an unrelated administrator connection. Cross-layer diagnosis requires more context but prevents fixing the wrong subsystem. Change only the supported boundary, verify the originally failing operation and document how the error translation could be improved to make the next incident easier to identify.

Why this matters

Preserve the exact service response and resolved endpoint instead of grouping both as 'network issues.'

A common trap

A generic connection error proves DNS failed without further evidence.

KEEP THESE WITH YOU

Today’s takeaways

IAM authorization: A request needs applicable permissions and must survive explicit denies and other policy boundaries.

DNS diagnosis: Separate name resolution from service reachability.

Cross-layer reasoning: An application may surface an access failure as a generic connection error.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed