Skip to main content
CloudFormation could not resolve an IAM role that a resource in your stack references. The failure came from your AWS account’s configuration, permissions, or limits. Fjall assigns this code when the root-cause resource’s CloudFormation status reason reports that a role was not found. Every other missing-dependency shape lands on a different code, so read the provider reason before you start hunting.

Why this happens

A deleted S3 bucket, a vanished stack export, or any other missing resource that is not an IAM role classifies as cfn.resource_create_failed, not cfn.dependency.

How to fix it

  1. Read the provider reason in the failure block. CloudFormation quotes it verbatim and names the role it could not find.
  2. Look the role up in the target account and region. Use fjall aws exec --target production-use1 -- aws iam get-role --role-name <name> so the lookup runs with the same credentials as the deploy.
  3. Fix the reference or restore the role. Correct the name or ARN in your infrastructure.ts if it is wrong, or re-create the role if it was deleted outside Fjall.
  4. Check for drift when the role was deleted in the console. Run fjall drift detect to confirm the deletion, then fjall drift repair to remediate it. A stack wedged on a deleted resource fails on every retry until drift is repaired.
  5. Deploy again.

What Fjall shows you

The failure appears on the deployment’s detail page on fjall.io, in the CLI’s failure block, and as the row title in the deployments list. All three carry the same fields: the failure title, the code and root-cause resource, a per-occurrence detail sentence, the fault attribution, CloudFormation’s verbatim reason, the remediation steps, and a link back to this page. Under --non-interactive the block is labelled Error Detail. The default interactive run prints the same fields under a red Deployment failed heading.
The fourth step is resource-specific: Fjall appends one when the root cause resource is an IAM, Lambda, or ECS resource, as the AWS::IAM::Role above. When Fjall also spots resources that CloudFormation tracks but that no longer exist in AWS, two drift steps are added to the top of the remediation list, pointing at fjall drift detect and fjall drift repair.

Next Steps

fjall drift

Detect and repair resources deleted outside CloudFormation.

Deployment safety

How Fjall protects your stacks during a deploy.

fjall deploy

Command reference for deploying an application.

cfn.resource_create_failed

The code for other missing or failed resource operations.