SAM Doctor

ERROR REFERENCE

every Fn::GetAtt object requires two non-empty parameters

CloudFormation found a malformed Fn::GetAtt expression. One occurrence is missing its logical resource id or attribute name, or contains more than those two parts.

WHAT IT MEANS

What this error means

Fn::GetAtt reads one attribute from one resource already declared in the template. Its long form is a two-item list; its YAML short form combines the same resource and attribute with a dot. CloudFormation validates that shape before it changes any resources, so retrying the same change set cannot clear this error.

The message does not name the malformed occurrence. Inspect the exact template submitted to CloudFormation, especially when SAM transforms or CDK synthesis produced a different template from the source file.

FIX

How to fix it

  1. Find every GetAtt in the submitted template. Check generated or synthesized output as well as the source template.
  2. Give each occurrence one resource and one attribute. Use either:
    Fn::GetAtt: [WorkerFunction, Arn]
    
    !GetAtt WorkerFunction.Arn
  3. Validate the corrected template before deploying again. For a SAM template:
    sam validate --lint --template-file template.yaml
    For generated CloudFormation, run the same lint check against the synthesized template rather than only the source that produced it.

AUTOMATE THE TRIAGE

Diagnose this automatically

SAM Doctor recognizes this exact template rejection (high confidence) and points to the two-part intrinsic-function shape. It runs locally; no AWS access and no log upload.

python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown

RELATED