Lambda function did not stabilize

1

Our AWS stack lambda deployment is failing to deploy due to a "Resource handler returned message: "Resource of type 'AWS::Lambda::Function' with identifier .. did not stabilize." (HandlerErrorCode: NotStabilized)". The problem seems be with just one function in the stack since others update successfully before being rolled back. This is the first time that this happened to us and is strange because the function does work as expected when called with sam local invoke and no logic changes were introduced. I've tried to deploy from two different machines and got the same results and deleting the stack is not an option for us. I have even tried to introduce small ineffectual code changes to the function in question to see if this would resolve the error but the issue remained. Any help is greatly appreciated.

Keith
質問済み 8ヶ月前2025ビュー
3回答
0
承認された回答

We were able to identify the issue after attempting to deploy the same code into a new stack. This resulted in a more descriptive InvalidImage(SizeLimitExceeded: Uncompressed container image size exceeds 10 GiB limit) .. failed to stabilize error.

The docker images command was used to confirm the size of the failing function's image, and confirmed that it was indeed 1 GB over the limit.

As a result, we were then able to optimise our image to bring it down below this threshold.

Keith
回答済み 7ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前
0

Hello.

Can you share the SAM template with the problem?
I would like to check if there are any problems with the template syntax.

profile picture
エキスパート
回答済み 8ヶ月前
0

I have attempted validating my SAM template using aws cloudformation validate-template --template-body file:///... but got no errors, output below:

{
    "Parameters": [
        {
            "ParameterKey": "BucketName",
            "NoEcho": false
        },
        {
            "ParameterKey": "SentryDSN",
            "NoEcho": false,
            "Description": "DSN address of the Sentry project"
        },
        {
            "ParameterKey": "QueueName",
            "NoEcho": false,
            "Description": "Results queue name"
        },
        {
            "ParameterKey": "QueueURL",
            "NoEcho": false,
            "Description": "Results queue url"
        }
    ],
    "Description": "Analyzer\n",
    "Capabilities": [
        "CAPABILITY_AUTO_EXPAND"
    ]
}
Keith
回答済み 8ヶ月前

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

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

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

関連するコンテンツ