Cloud security engineer comparing AWS IAM role trust policies and principal IDs after a role is deleted and recreated.

You Recreated the IAM Role. Why Did Its Trust Stop Working?

Wed, Dec 2, 2026

Infrastructure has recreated the expected IAM role name and path, the ARN looks familiar, and a dependent AssumeRole call still fails. That symptom is not a naming problem. It is an identity-lifecycle question: did the downstream trust approve one specific role incarnation, or did it deliberately approve whichever owned role currently occupies that exact ARN?

This playbook is for experienced IAM, cloud-security and platform engineers who need to make that distinction without turning the investigation into a generic permissions exercise. The proposed fixture uses one disposable, owned, non-production AWS account in the commercial aws partition, an independent operator role, four explicitly owned laboratory roles, and one fixed regional STS endpoint. It compares two target trusts: a direct role ARN in Principal, and account-root Principal plus exact ArnEquals on aws:PrincipalArn.

AWS IAM documents that a role ARN saved directly in a role trust Principal is translated to the role's unique principal ID, so deleting the role breaks that association; recreating the same name and path does not restore the old identity. AWS also documents that ARNs used in condition keys are not converted to principal IDs, so an exact aws:PrincipalArn condition can continue to match a replacement role at the same ARN.

No AWS laboratory was executed for this article. Every result below is an expected outcome, proposed procedure, or explicitly synthetic evidence check. The objective is not to prove one trust style universally superior. It is to help the policy owner approve the identity lifecycle they actually intend.

Decide which identity the trust should follow

Before changing anything, write the acceptance question in operational terms: “When source role S is deleted and a new role is created with the same path and name, should target D continue to reject that replacement until an owner explicitly rebinds trust, while target C intentionally follows the reusable ARN?” That is the contract being tested.

The distinction is lifecycle semantics, not IAM basics. A direct role ARN in Principal is an incarnation-bound admission rule because AWS persists a unique principal ID behind that reference. By contrast, an account principal such as arn:aws:iam::<ACCOUNT_ID>:root delegates authority to the account rather than only the root user, and an exact ArnEquals condition on aws:PrincipalArn can narrow that delegation to one role ARN. The AWS Security Blog explicitly frames the replacement behavior as a security-policy choice rather than an automatic repair.

The four decision classes are therefore: retain the incarnation boundary; approve the replacement identity and explicitly rebind; deliberately accept a design that follows the same ARN across recreations; or hold because the evidence is incomplete. Unexpected access is a separate reject-and-investigate outcome.

The fixture stays inside one owned account. An independent operator role creates and inventories the laboratory but is not one of the source roles being tested. For broader organizational framing, enterprise IAM foundations are useful context, but this exercise is intentionally narrower: it tests target-role admission after an identity replacement, not workforce provisioning, SSO, RBAC design or post-admission application permissions. The latter belong to a different validation layer.

Distinguish the role ARN, RoleId and session identity

Four identifiers must not be collapsed into one concept.

Field

What it identifies

How to use it here

IAM role ARN

The address formed from account, path and role name

Expect the original and replacement S to have the same ARN if path and name are recreated exactly

RoleId

AWS's stable unique identifier for one role object

Require the replacement S to have a different RoleId from the deleted S

STS assumed-role ARN

One issued session, including RoleSessionName

Verify each successful probe used the intended fresh source or target session

AssumedRoleUser / UserId

STS identifiers for returned temporary credentials

Correlate the AssumeRole response with GetCallerIdentity

GetRole returns role metadata including path, ARN, creation date, role ID and the trust document; AWS notes that policy text returned by the API is URL-encoded, while SDKs may decode it for you. AssumeRole returns temporary credentials and an AssumedRoleUser, and GetCallerIdentity returns the account, ARN and user ID for the credentials actually used.

A matching role ARN after recreation is therefore necessary but insufficient evidence of identity continuity. The expected invariant is old_s_arn == new_s_arn and old_s_role_id != new_s_role_id. That is the core of the IAM role recreation trust policy problem.

This page deliberately does not repeat STS session-policy permission validation. That separate question asks what an issued session can do after issuance. Here the question is whether the target role issues the next session at all.

Bind every probe to freshly issued credentials

Each test case must create the source session needed for that phase and then, on success, construct a new Boto3 session from all three returned credential components: access key ID, secret access key and session token. Boto3 supports explicit credential and region parameters on a Session; record the actually installed Python, Boto3 and botocore versions rather than copying documentation versions.

Use one fixed commercial-region endpoint for the run, for example:

partition = aws
region = us-west-2
sts_endpoint = https://sts.us-west-2.amazonaws.com

The endpoint choice is part of the manifest, not an assertion that us-west-2 is otherwise special. Request DurationSeconds=900. AWS documents 900 seconds as the minimum AssumeRole duration and a one-hour maximum for role chaining, so 900 seconds fits this two-hop fixture.

Never reuse an S session created before deletion as evidence about replacement S. For every successful target assumption, compare the returned AssumedRoleUser.Arn with GetCallerIdentity().Arn, confirm the account ID, session name and expected target role name, and retain the source role ARN/RoleId from the phase manifest. GetCallerIdentity proves who the presented credentials represent; it does not prove application authorization or the correctness of the trust design.

Freeze the four-role laboratory

Use one run-specific namespace and fail closed on collisions. A compact manifest can look like this; every value in angle brackets is a placeholder to be populated by an authorized run.

run_id: <UTC_RUN_ID>
account_id: <12_DIGIT_ACCOUNT_ID>
partition: aws
region: us-west-2
sts_endpoint: https://sts.us-west-2.amazonaws.com
run_date: <UTC_DATE>
python_version: <ACTUAL>
boto3_version: <ACTUAL>
botocore_version: <ACTUAL>

operator:
  role_arn: <INDEPENDENT_OPERATOR_ROLE_ARN>

roles:
  S: {path: /refonte-role-rebind/<RUN_ID>/, name: SourceS}
  O: {path: /refonte-role-rebind/<RUN_ID>/, name: OtherO}
  D: {path: /refonte-role-rebind/<RUN_ID>/, name: DirectTargetD}
  C: {path: /refonte-role-rebind/<RUN_ID>/, name: ConditionTargetC}

owned_inline_policy_name: AssumeTargets
cleanup_owner: <TEAM_OR_CHANGE_ID>

Before creation, call GetRole for all four names and abort if any already exists under the intended identity contract. Do not adopt or delete pre-existing roles. The fixture is disposable and non-production by design.

CreateRole accepts an explicit path and trust policy and returns the new role object. Freeze the names, paths and trust documents before creation, then capture Arn, RoleId, CreateDate, Path, RoleName and the response request ID immediately after each create. A reviewable setup order is: create S and O with operator-only trust; create D with direct S trust; create C with account-root plus exact aws:PrincipalArn; attach only the declared inline source permission to S and O; then inventory all four roles before any probe.

The independent operator's permissions must be reviewed separately. This article does not prescribe a broad administrator policy. It only requires the operator to perform the explicitly authorized IAM setup, inventory, update and cleanup calls for these manifest-owned roles.

Make the permissions and trust documents explicit

S and O trust only the approved operator role. Their source trust can use this exact template, with the operator ARN substituted:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "<OPERATOR_ROLE_ARN>"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

S and O each receive one owned inline identity policy allowing only sts:AssumeRole on D and C. This symmetry matters: O must possess the same target-call permission while differing in identity.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "sts:AssumeRole",
      "Resource": [
        "<D_IAM_ROLE_ARN>",
        "<C_IAM_ROLE_ARN>"
      ]
    }
  ]
}

D's complete trust is the incarnation-bound form:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "<S_IAM_ROLE_ARN>"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}

C's complete trust is the reusable-ARN form:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "AWS": "arn:aws:iam::<ACCOUNT_ID>:root"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "ArnEquals": {
          "aws:PrincipalArn": "<S_IAM_ROLE_ARN>"
        }
      }
    }
  ]
}

Do not add Resource to these role trust policies, do not replace the account principal with *, and do not widen the ARN condition. AWS documents that the account-root ARN in Principal delegates to the account, and that aws:PrincipalArn for role requests is the IAM role ARN rather than the STS session ARN. AWS recommends ARN operators for ARN comparisons. In this same-account condition form, AWS's trust-policy guidance states that the calling role needs identity-based sts:AssumeRole permission, which the source policy above supplies.

D and C need no application permission grants for this test. A successful target session is validated with sts:GetCallerIdentity, which AWS says does not require permission.

Audit configuration before interpreting an outcome

Treat inventory completeness as a prerequisite, not paperwork. For each role, capture GetRole; enumerate inline policies; enumerate attached managed policies; capture any permissions boundary; and enumerate instance-profile associations. S and O must each have exactly one declared inline policy and zero managed attachments. D and C must have no application permission policies. No laboratory role may have a permissions boundary or instance-profile association.

Programmatic deletion requires subordinate items to be removed first; AWS specifically lists inline policies, attached managed policies and instance-profile relationships. Therefore an unexpected attachment is not an invitation to detach it. It is evidence that the fixture no longer matches its ownership model, so the run is HOLD.

Completeness matters for paginated lists. The same discipline described in complete AWS CLI query populations applies here: do not infer “none attached” from a partial page or a helper that silently truncates results. Reconcile the enumerated population to the declared manifest.

Also record applicable organization-level and account-level controls that can affect AssumeRole, such as service control policies or other guardrails already governing the account. Freeze concurrent IAM writes for the fixture and recheck those controls at each phase boundary. The playbook does not ask anyone to weaken guardrails to obtain a desired result. A control that is unknown, changing, or mandatory but unmodeled produces HOLD.

Exclude supplied session policies, session tags, transitive tags and SourceIdentity experiments. The AssumeRole API supports several of those features, but introducing them would change the request context and confound the lifecycle question. If the environment requires unmodeled context, stop rather than silently broadening the test.

For policy evidence, retain both raw returned representation and a canonical digest. If using a raw API response, account for URL encoding; if using an SDK representation that is already decoded, do not decode twice. Canonicalize only for comparison (for example JSON parse, sorted keys, compact separators) and keep the raw bytes or string beside the digest. Before deletion, persist an immutable mapping {S_ARN: old_S_RoleId}. That historical record must never be overwritten by a later lookup of the reused ARN.

Establish the original positive and negative controls

Freeze the first four cases before mutation:

Case

Source

Target

Phase

Expected outcome

T01

original S

D

before deletion

ALLOW

T02

original S

C

before deletion

ALLOW

T03

O

D

before deletion

DENY

T04

O

C

before deletion

DENY

Expected results only: NOT EXECUTED.

A compact probe can keep issuance and identity verification explicit. This is proposed code, not an execution transcript:

import boto3
from botocore.exceptions import ClientError

REGION = "us-west-2"
STS_ENDPOINT = "https://sts.us-west-2.amazonaws.com"

def sts_from_creds(creds):
    session = boto3.Session(
        aws_access_key_id=creds["AccessKeyId"],
        aws_secret_access_key=creds["SecretAccessKey"],
        aws_session_token=creds["SessionToken"],
        region_name=REGION,
    )
    return session.client("sts", region_name=REGION, endpoint_url=STS_ENDPOINT)

def assume(sts, role_arn, session_name):
    return sts.assume_role(
        RoleArn=role_arn,
        RoleSessionName=session_name,
        DurationSeconds=900,
    )

def probe(source_sts, target_arn, session_name):
    try:
        response = assume(source_sts, target_arn, session_name)
        target_sts = sts_from_creds(response["Credentials"])
        caller = target_sts.get_caller_identity()
        return {
            "status": "ALLOW",
            "assumed_role_user": response["AssumedRoleUser"],
            "caller_identity": caller,
            "request_id": response["ResponseMetadata"]["RequestId"],
            "error_code": None,
        }
    except ClientError as exc:
        meta = exc.response.get("ResponseMetadata", {})
        err = exc.response.get("Error", {})
        return {
            "status": "DENY_OR_ERROR",
            "assumed_role_user": None,
            "caller_identity": None,
            "request_id": meta.get("RequestId"),
            "error_code": err.get("Code"),
            "http_status": meta.get("HTTPStatusCode"),
        }

The operator first assumes S or O with a unique source-session name; a second STS client is constructed from those fresh credentials and used for the target probe. Successful target issuance is then independently checked with GetCallerIdentity.

Keep the unrelated-role control independent

O is not a weakened source. It has the same inline permission to call sts:AssumeRole on D and C, but it has a different ARN and RoleId. Therefore T03 and T04 specifically test whether the target admission rules reject an unrelated principal that possesses the same caller-side action permission.

A failed positive control blocks later attribution. If T01 or T02 does not allow under the verified original configuration, do not proceed to delete S and later claim that a replacement caused a denial.

Preserve the exact service error code, HTTP status and request ID for every failed call. AWS STS documents AccessDeniedException as a permission error with HTTP 403, but also documents other 403-class failures such as expired or unrecognized credentials. AWS service examples also show AccessDenied with HTTP 403 for AssumeRole; the spelling can differ from the common-error table. For this fixture, only AccessDenied or AccessDeniedException with HTTP 403 is eligible denial evidence, and only after identity, credential freshness, endpoint and policy prerequisites are verified. Any other error is UNKNOWN/HOLD, not “deny as expected.”

Delete only the declared source and inspect the orphan reference

Immediately before deletion, re-run the ownership inventory for S. The expected state is one known inline policy, no managed policies, no boundary and no instance profile. Delete only that named inline policy, then call DeleteRole for S. Do not run a bulk-detach routine. AWS documents that programmatic role deletion fails while required subordinate items remain attached.

After deletion, poll GetRole on D and retain each bounded attempt with UTC timestamp, request ID and returned trust document. The documented expectation is that the direct Principal reference can become visibly represented as the old unique principal ID because AWS can no longer reverse-map that ID to a live role ARN. AWS explicitly states that deletion breaks the association and that recreating the role does not make the old principal ID match the replacement.

Compare the displayed orphan identifier to the retained old S RoleId. This is a valuable lifecycle checkpoint because it distinguishes raw policy representation from intent: a trust that originally displayed an ARN may later display the orphaned ID without any call to UpdateAssumeRolePolicy. The representation changed because the referenced identity disappeared, not because an operator edited D.

Inspect C at the same phase. Its policy should remain the account principal plus the exact ARN condition. AWS says condition-key ARNs are not converted to principal IDs, which is why this policy's lifecycle semantics differ.

Record every attempt; do not treat “it appeared after N seconds” as an AWS propagation guarantee. IAM troubleshooting guidance warns that changes may not be immediately visible because IAM is eventually consistent. The retry deadline used later is an authored laboratory rule, not an AWS SLA.

Recreate the ARN and prove a new identity exists

Recreate S with the exact frozen path and name, the same operator-only trust document, and the same declared source permission document. Capture the CreateRole response before any later lookup can obscure the event: RoleName, Path, Arn, RoleId, CreateDate and request ID. CreateRole returns role metadata and accepts the trust policy and path as explicit request inputs.

Then put only the owned AssumeTargets inline policy back on S. Re-inventory S and O and compare canonical permission digests. S and O should again be symmetric in caller-side target permissions. Re-inventory D and C and confirm their role identities did not change during source replacement.

The expected identity facts are:

old_S_arn     == new_S_arn
old_S_role_id != new_S_role_id
D_role_id_before == D_role_id_after
C_role_id_before == C_role_id_after
S_permission_digest == O_permission_digest

These are acceptance conditions to test, not observations reported by this article.

Reject a matching ARN with the wrong generation

The replacement must be treated as a new generation even though the ARN string is reused. The role ARN is the lookup address; RoleId is the generation discriminator in this playbook. AWS defines RoleId as the stable unique string identifying the role, while the deleted-role trust documentation explains that a recreated role receives a new principal ID.

Tie every later source session to the replacement manifest. The evidence record for T05, T06, T07 and T08 must carry source_role_id = new_S_role_id for S cases and O's independently recorded RoleId for O cases. A caller ARN alone is insufficient because the same S ARN is intentionally present in both historical generations.

Never update the historical {old_S_arn: old_S_role_id} record after recreation. Maintain a phase-aware identity map instead:

{
  "pre_delete": {"arn": "<S_ARN>", "role_id": "<OLD_ROLE_ID>"},
  "post_recreate": {"arn": "<S_ARN>", "role_id": "<NEW_ROLE_ID>"}
}

If ARN equality fails, RoleId difference fails, the account differs, or a required metadata field is missing, classify the run HOLD. Do not “fix” the manifest to match whatever the API returned.

Compare both unchanged target trusts

Now probe the replacement against the unchanged targets:

Case

Source

Target

Phase

Expected outcome

T05

replacement S

unchanged D

post-recreate

DENY

T06

replacement S

unchanged C

post-recreate

ALLOW

Expected results only: NOT EXECUTED.

Obtain T06 as the post-recreation positive control before attributing T05. If the replacement cannot enter C, the fixture has not shown that the replacement source session, identity policy, target call, STS endpoint and account prerequisites are functioning together. A T05 denial by itself would then be ambiguous.

The expected difference follows directly from AWS's documented save semantics. D's direct role ARN was translated to the old unique principal ID when the trust was saved, and deletion broke that binding. Recreating the same ARN creates a role with a different principal ID, so unchanged D should not accept it. C instead delegates to the account and compares the request's aws:PrincipalArn to the exact S role ARN; AWS says that key reports the IAM role ARN for role requests and that condition ARNs are not transformed to IDs.

Use a bounded readiness policy, for example one attempt every five seconds for up to two minutes per phase after a confirmed configuration change. That deadline is deliberately conservative laboratory policy, not an AWS propagation promise. IAM is eventually consistent, so retain every attempt rather than hiding transient states. If the deadline expires without a stable interpretable result, or if T06 and T05 contradict the documented expectations under verified configuration, classify the relevant conclusion HOLD and investigate.

Do not generalize C into a default repair. A trust that follows a reusable ARN is correct only when the IAM owner deliberately approves that lifecycle behavior.

Rebind the direct target only after identity approval

Do not repair D merely because T05 denied. First present the replacement S manifest to the IAM owner: account, path, role name, reused ARN, new RoleId, CreateDate, source trust digest, source permission digest, operator identity and the evidence that the old RoleId is gone. The owner must explicitly approve this new identity as the replacement principal.

Only after that approval should the operator update D's trust with the exact current S ARN while preserving every other statement semantic. UpdateAssumeRolePolicy is the named-role API for replacing a role's trust policy document. Read D back after the update and retain the new raw policy representation and digest.

Then run:

Case

Source

Target

Phase

Expected outcome

T07

replacement S

rebound D

post-rebind

ALLOW

T08

O

rebound D

post-rebind

DENY

Expected results only: NOT EXECUTED.

T07 shows that the approved replacement can enter D after an explicit trust write. T08 checks that the repair did not widen admission to the unrelated role. A successful T07 without a successful T08 negative control is incomplete evidence.

Preserve meaning across different policy representations

Keep two records: raw policy text/digests and a phase-aware binding record. They answer different questions.

Before deletion, the binding basis for D is documented inference: AWS states that when a role ARN is saved in a role trust Principal, IAM transforms it to that role's unique principal ID even though the displayed trust normally reverses it to the ARN. Record the inferred mapping from the frozen source metadata: displayed S ARN -> retained old S RoleId.

After deletion, the orphan ID may become directly visible in the returned trust. At that point, store the raw observation as well as the interpretation that it equals the retained old S RoleId.

After rebinding, the API may again display the ARN. Do not claim that GetRole exposes some hidden “current stored principal ID” field while showing the ARN; it does not. GetRole returns the role and trust document, while AWS documentation supplies the save-time transformation semantics. The binding record should therefore say basis = documented_save_semantics + approved_new_role_metadata, not pretend an unexposed field was observed.

Most importantly, a live lookup of the reused S name after recreation must never rewrite the pre-delete mapping. Historical binding is evidence, not a mutable cache.

Reconcile the complete eight-case platform matrix

The full oracle is small enough to freeze in one table:

Case

Source generation

Target state

Expected

T01

original S

original D

ALLOW

T02

original S

original C

ALLOW

T03

O

original D

DENY

T04

O

original C

DENY

T05

replacement S

unchanged D

DENY

T06

replacement S

unchanged C

ALLOW

T07

replacement S

rebound D

ALLOW

T08

O

rebound D

DENY

Oracle only: NOT EXECUTED.

The reconciler should require exactly one final verdict for each case while allowing multiple timestamped retry attempts underneath it. Each final verdict must be backed by the expected phase identity and configuration. Recommended evidence fields are:

run_id
case_id
phase
attempt
timestamp
source_arn
source_role_id
source_caller_identity
target_arn
target_role_id
source_permission_digest
target_trust_digest
binding_basis
sts_endpoint
python_version
boto3_version
botocore_version
status
error_code
http_status
request_id
outcome

Never log access keys, secret keys or session tokens.

For each case, validate in this order: run and phase identity; source ARN and RoleId; fresh caller identity; target ARN and RoleId; expected source permission digest; expected target trust digest; phase-aware binding basis; fixed endpoint and tool versions; then service outcome. A generic 403 must not short-circuit those checks because AWS documents multiple 403-class causes.

The reconciler should reject missing case IDs, duplicate final verdicts, contradictory retries without resolution, unknown error classes, mismatched source generations, changed target identities, or policy digests from the wrong phase. A valid “unexpected access” result is not missing evidence; it is a security-significant contradiction requiring rejection and investigation. Missing or internally inconsistent evidence is HOLD.

A complete run supports only the narrow claim that these exact principals, policy states, endpoint, time window and controls exhibited the reconciled admission behavior. It does not certify unrelated IAM permissions, application resources or other accounts.

Test whether the evidence checker can reject bad evidence

The checker itself needs negative tests that are clearly separate from AWS behavior. T09 and T10 are local, synthetic fixtures. They do not represent cloud observations.

T09 takes an otherwise well-formed replacement-S record from T05, T06 or T07 and substitutes old_S_role_id for new_S_role_id. The expected local checker result is HOLD because the record claims a fresh phase while identifying the deleted generation.

T10 removes one required control result (for example T06) from an otherwise complete eight-case report. The expected local checker result is HOLD because the post-recreation positive control is absent.

Concise pseudocode is enough:

EXPECTED_CASES = {f"T{i:02d}" for i in range(1, 9)}

def reconcile(report, manifest):
    finals = [r for r in report if r["attempt"] == "FINAL"]

    assert {r["case_id"] for r in finals} == EXPECTED_CASES
    assert len(finals) == 8

    for r in finals:
        assert r["run_id"] == manifest["run_id"]
        assert (
            r["target_role_id"]
            == manifest[r["phase"]]["target_role_id"][r["case_id"]]
        )
        if r["case_id"] in {"T05", "T06", "T07"}:
            assert (
                r["source_role_id"]
                == manifest["post_recreate"]["S"]["role_id"]
            )

    return "PASS"

synthetic_expectations = {
    "T09": "old RoleId substituted for replacement -> HOLD",
    "T10": "required final case removed -> HOLD",
}

In implementation, convert failed assertions to structured HOLD reasons rather than uncaught exceptions. The purpose is to prove that a plausible-looking report cannot pass merely because its ARNs and outcomes look right.

Identity fields, immutable phase mappings and exact case coverage work together. The reused ARN makes a stale-generation record superficially credible; T09 ensures RoleId catches that defect. A seven-case report may still contain all apparently “interesting” outcomes; T10 ensures control completeness is mandatory. Neither test says anything about AWS service behavior.

Keep one distinction sharp: a valid AWS result that violates the oracle is unexpected access or denial requiring investigation. Missing, contradictory or malformed evidence is HOLD. Do not blur a security finding into an evidence-quality classification.

Recover without pretending the old identity returns

If the run fails or produces an unexpected result, preserve the full evidence set, suspend dependent changes, and return to the policy owner's intended lifecycle. The owner has two legitimate directions: keep the closed incarnation boundary, or approve the replacement S identity and create a new binding. A third direction, using the ARN-following condition design, is also legitimate only when that behavior is the declared contract.

A successful rebind establishes tested target-role admission, not end-to-end workload recovery. Any dependent service still needs its own validation. The evidence discipline is analogous to VPC Flow Logs capture and delivery checks: one layer's success or absence supports only the claim that layer actually measures. Here, T07 proves only that replacement S can obtain a D session under the tested conditions. It does not prove a workload can reach an endpoint, read a data store, decrypt a key or satisfy some application authorization.

Do not discard the failed run after repair. Preserve pre-delete mappings, orphan observations, policy digests, attempts and reviewer decisions as the change record. Recovery that overwrites the evidence makes later incident analysis harder.

A deleted RoleId has no identity rollback

Restoring the old JSON or recreating the same role name cannot restore the deleted principal identity. AWS says the direct trust relationship is broken by deletion because the recreated role receives a different principal ID; resaving the current ARN creates a new binding to the new identity. The correct recovery mechanism is therefore either reviewed acceptance of the new principal through rebind, or continued closure.

A copied trust policy document cannot resurrect the deleted identity. If the copied document contains the old orphan principal ID, it still names a principal that no longer exists. If an operator rewrites the current S ARN into D and saves it, that is not rollback; it is a new trust decision.

This article also does not claim revocation of previously issued credentials. Deleting a role, closing a local client, or editing a trust policy should not be described here as proof that every pre-existing session has stopped working. Previously issued credential revocation is explicitly outside scope.

Cleanup is another ownership check, not a convenience script. Re-inventory S, O, D and C. Delete only manifest-owned inline policies and roles whose identities still match the manifest. If any role has an unknown attachment, managed policy, instance-profile association or changed RoleId, stop cleanup and escalate ownership rather than detaching or deleting it.

Assign the lifecycle decision and its operational owner

The final decision belongs to named operational owners, not to the test harness.

Decision

Required evidence

Meaning

Primary owner

KEEP_INCARNATION_BOUNDARY

T01/T02 pass originally; T05 denies; T06 allows; no rebind approved

Deleted S remains excluded from D; replacement requires a future explicit approval

IAM policy owner

APPROVE_EXPLICIT_REBIND

Replacement identity manifest approved; D updated; T07 allows; T08 denies

New S is intentionally admitted to D as a new principal generation

IAM policy owner, executed by platform operator

ACCEPT_NAME_BOUND_DESIGN

C policy reviewed; T02 and T06 allow; O controls deny

Policy owner intentionally accepts exact-ARN continuity across replacement

IAM policy owner

HOLD_EVIDENCE

Missing controls, conflicting identities, incomplete inventory, unknown context or unresolved propagation

No admission conclusion is approved

Evidence reviewer

REJECT_UNEXPECTED_ACCESS

A case validly produces access outside the frozen oracle

Treat as a security-significant contradiction and investigate before further changes

IAM owner plus incident/security lead

The platform operator owns fixture creation, inventory, bounded retries, raw evidence and cleanup. The evidence reviewer independently checks historical ARN-to-RoleId mappings, source generation, policy digests, controls and exact case coverage. The workload owner validates dependent service behavior after any trust recovery. This separation fits broader cloud security engineering responsibilities, which include identity/access control, incident response and collaboration with infrastructure teams, without importing that article's career or salary claims into this technical decision.

Rerun the lifecycle acceptance test whenever S is replaced again, D or C trust changes, S/O caller-side permissions change, an organization or account control affecting AssumeRole changes, mandatory request context is introduced, or the test tooling changes materially enough to affect evidence capture. Tool version drift alone does not prove IAM behavior changed, but it is a reason to re-establish reproducibility if the prior evidence must support a new approval.

The limited supported claim is precise: under a verified same-account fixture, direct Principal trust can remain bound to the deleted role's unique identity, while an exact aws:PrincipalArn condition can intentionally follow a role recreated at the same ARN. Which identity should be approved is a policy-owner decision, and direct trust should be rebound only after the replacement RoleId is explicitly accepted. AWS's own guidance presents the two deletion behaviors as choices based on the security posture you want.

Build the IAM foundations behind lifecycle reviews

This exercise assumes comfort with IAM JSON, STS, evidence capture and change ownership. Refonte Learning's Cloud Security Engineer Essentials program covers broader foundations including IAM, cloud architecture security, encryption, threat detection, incident response, governance and monitoring. The program page lists a three-month duration at 10–12 hours per week, practical projects, personalized mentorship, and tools including AWS Security Hub, Azure Security Center, Google Cloud Security Command Center and Splunk. It also states that successful completion offers a Training Certificate and Certificate of Internship, while separately using “Potential Internship” language.

The page recommends basic networking and cloud knowledge, lists an admission prerequisite of working toward a bachelor's or higher degree, and its FAQ also describes the course as beginner-friendly. Review the current curriculum and applicable admission details before enrolling.

Do not infer that this specialized RoleId-recreation laboratory, Boto3 workflow, or exact STS evidence model is taught there; that coverage is not confirmed by the cited program page. The useful connection is foundational: IAM, cloud-security operations, projects and mentoring are directly relevant preparation for conducting lifecycle reviews like this one with appropriate supervision and change control.