Template error: instance of Fn::GetAtt references undefined resource LambdaExecutionRole

0

Hi everyone,

I'm trying to deploy in amplify and I got this error.

CloudFormation::Stack Template error: instance of Fn::GetAtt references undefined resource LambdaExecutionRole

I tried to redeploy the last working version, but still, I encounter the same error. Here is the code for the outputs of my CloudFormation template.

"Outputs": {
        "Name": {
            "Value": {
                "Ref": "LambdaFunction"
            }
        },
        "Arn": {
            "Value": {"Fn::GetAtt": ["LambdaFunction", "Arn"]}
        },
        "Region": {
            "Value": {
                "Ref": "AWS::Region"
            }
        },
        "LambdaExecutionRole": {
            "Value": "arn:aws:iam::xxxxxxxx:role/xxx"
        }
        
    }

I appreciate in advance if anyone could help me with this matter.

  • The template is fragmented, and I’m unsure what caused the error. Therefore, could you please include the entire template in the question text.

1回答
0

Without seeing the whole template I can't be sure. But it looks like you are using Fn::GetAtt to reference LambdaExecutionRole which is an "Output" and not a "Resource" and that's not supported. If you search for {"Fn::GetAtt": ["LambdaExecutionRole" within your template, you should find the section in the Resource block that is causing your error.

Output is intended to be used by "things outside" the stack, not from within the template itself.

I hope this helped!

profile picture
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ