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 年前檢視次數 502 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南