Cloudformation - Lambda did not stabilise

0

Hello,

I am facing an issue where my cloudformation is failing to update my Lambda function, showing an error:

Resource handler returned message: "Resource of type 'AWS::Lambda::Function' with identifier '...' did not stabilize." (RequestToken: 520189e2-99cf-5407-db18-9f1cca71dc37, HandlerErrorCode: NotStabilized)

The final error looks to be very similar to this post by Keith, but unlike what Keith mentioned, my Lambda's image is only 1.26GB in size, so that should not trigger the SizeLimitExceeded problem. When I go to the Lambda function, I see the error below instead. I also tried granting ECR Full Access to the Lambda Role, but that did not help too.

Failed to restore the function ...: The function does not have permission to access the specified image.

What is weird for me is that the cloudformation worked via the same CI/CD process during a deployment made few weeks ago. I also have a few "duplicated cloudformations" serving different environments, and out of them one managed to deploy successfully with the same set of codes.

Appreciate if anyone else has some thoughts to share about this, thanks!

  • Could you share the function execution role assigned?

1回答
0

To resolve this issues kindly do the below checks :-

NotStabilized Error in CloudFormation: The CloudFormation stack update failed due to the Lambda function not stabilizing. This can be caused by service limits, dependencies, or AWS throttling issues. Troubleshooting steps included checking service status, increasing timeout, verifying resource limits, and managing dependencies.

Function Permission Issue: The Lambda function encountered an error stating it lacked permission to access its Docker image in Amazon ECR. Troubleshooting involved checking IAM permissions (including ECR access permissions), ensuring correct image URIs, reviewing ECR repository policies, and testing access via AWS CLI.

To resolve these issues, thorough verification of IAM roles, permissions, resource configurations, and dependencies across environments is essential. Detailed CloudFormation and Lambda logs should provide further insights into the root causes of deployment failures.

profile picture
エキスパート
回答済み 6ヶ月前
profile picture
エキスパート
レビュー済み 6ヶ月前

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

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

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

関連するコンテンツ