teluzia.Cloud Engineer · Day 178
CHAPTER 26 · FEEDBACK AND GAP ANALYSIS

AWS/Terraform gap repair

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

What you’re learning today

AWS repair is today's starting point. Trace caller to API endpoint to policy evaluation, identifying action, resource and conditions. Change the resource ARN in a second case so an overly broad memorized answer is exposed. You will connect this with terraform repair and retest evidence. The lesson's artifact brings these decisions together: Draw an AWS access path and compare two synthetic Terraform plans, including drift and replacement; retest one case with a new resource address.

Think of it this way

AWS and Terraform repair compare the access route with the construction ledger; neither diagram alone proves the other's state.

TOPIC 01 / 03Step by step

AWS repair

Rebuild one weak request path including identity, network and service behavior. Make explicit which policy or route controls each hop; avoid treating all AccessDenied or timeouts as the same problem. Trace caller to API endpoint to policy evaluation, identifying action, resource and conditions. Change the resource ARN in a second case so an overly broad memorized answer is exposed.

WORKED EXAMPLE
Trace caller to API endpoint to policy evaluation, identifying action, resource and conditions. Change the resource ARN in a second case so an overly broad memorized answer is exposed.

An identity boundary determines permitted operations; a network boundary determines reachability; a service boundary defines request semantics. Imagine a workload reaches an object-storage endpoint but a request fails under one assumed role. Check the actual principal and action/resource context before altering routing. Build a contrasting case where the endpoint cannot be resolved, then explain why permission evaluation may not yet have occurred. AWS services have different controls and supported access paths, so name the specific request instead of claiming one universal checklist solves everything. Broader review aids orientation but targeted repair is needed for the failed mechanism. Keep synthetic policies and request context together, use official documentation to verify the uncertain rule and retest with changed conditions to show that the corrected reasoning is not tied to one memorized account example.

Why this matters

Change the resource ARN in a second case so an overly broad memorized answer is exposed.

A common trap

Every AccessDenied has the same policy cause.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

AWS repair

Rebuild one weak request path including identity, network and service behavior. Make explicit which policy or route controls each hop; avoid treating all AccessDenied or timeouts as the same problem. Trace caller to API endpoint to policy evaluation, identifying action, resource and conditions. Change the resource ARN in a second case so an overly broad memorized answer is exposed.

WORKED EXAMPLE
Trace caller to API endpoint to policy evaluation, identifying action, resource and conditions. Change the resource ARN in a second case so an overly broad memorized answer is exposed.

An identity boundary determines permitted operations; a network boundary determines reachability; a service boundary defines request semantics. Imagine a workload reaches an object-storage endpoint but a request fails under one assumed role. Check the actual principal and action/resource context before altering routing. Build a contrasting case where the endpoint cannot be resolved, then explain why permission evaluation may not yet have occurred. AWS services have different controls and supported access paths, so name the specific request instead of claiming one universal checklist solves everything. Broader review aids orientation but targeted repair is needed for the failed mechanism. Keep synthetic policies and request context together, use official documentation to verify the uncertain rule and retest with changed conditions to show that the corrected reasoning is not tied to one memorized account example.

Why this matters

Change the resource ARN in a second case so an overly broad memorized answer is exposed.

A common trap

Every AccessDenied has the same policy cause.

Terraform repair

Distinguish configuration, plan, state and remote resources. Explain drift and replacement with a small paper example; changing state casually can orphan resources or hide ownership. Configuration contains one resource, state binds it to a remote ID, and a plan proposes replacement after an immutable attribute changes. Explain all three views before proposing any state modification.

WORKED EXAMPLE
Configuration contains one resource, state binds it to a remote ID, and a plan proposes replacement after an immutable attribute changes. Explain all three views before proposing any state modification.

Desired configuration describes intent; state maps managed identities; drift describes a divergence in remote resources. Imagine a resource is manually changed and the next plan proposes restoring the declared setting. Explain which observation Terraform read, what configuration it compared and why the change appears in the plan. Contrast this with a missing state binding, where the issue is ownership mapping rather than simply an attribute difference. Do not repair either case by deleting state indiscriminately. A state operation can be necessary in some workflows, but requires explicit understanding and careful review. For learning, use paper plans or a safe existing sandbox to predict results first. The repaired model should explain configuration, state and actual object as three separate views and identify which view must change for the intended outcome.

Why this matters

Explain all three views before proposing any state modification.

A common trap

Terraform state and remote resources are the same thing.

Retest evidence

Write expected results for a policy or plan change before checking documentation. Re-solve a different example and preserve the comparison; familiarity with a tutorial is not independent competence. A second plan introduces a renamed resource address. Predict whether a move declaration or recreation may be relevant, then verify the reasoning against current official guidance without editing state casually.

WORKED EXAMPLE
A second plan introduces a renamed resource address. Predict whether a move declaration or recreation may be relevant, then verify the reasoning against current official guidance without editing state casually.

A transfer test changes the original inputs; an evidence comparison checks prediction against behavior; a residual gap remains when the mechanism is still uncertain. Imagine you fixed an action/resource mismatch in one policy exercise. Change the resource and add a condition in the retest so the old allow statement no longer settles the case. For Terraform, rename an address and ask how a supported move differs from delete-and-create behavior. State expected results before consulting documentation. Successful repetition of the original task can reflect recall of the answer rather than understanding. Harder variants reveal limitations but should still be relevant to the target roles and current level. Record the first incorrect assumption, the verified rule that repairs it and the next smallest exercise needed if the new outcome cannot yet be explained independently.

Why this matters

Predict whether a move declaration or recreation may be relevant, then verify the reasoning against current official guidance without editing state casually.

A common trap

A memorized example proves transfer to a different resource.

KEEP THESE WITH YOU

Today’s takeaways

AWS repair: Rebuild one weak request path including identity, network and service behavior.

Terraform repair: Distinguish configuration, plan, state and remote resources.

Retest evidence: Write expected results for a policy or plan change before checking documentation.

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