SAM Custom Resource Stuck on Create for Lambda with Node18

0

I was referring to the following link to create a Custom Resource for my SAM Template which uses a Lambda to get AMI ID from AMI Name. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/walkthrough-custom-resources-lambda-lookup-amiids.html

The link uses node8.10, but I used Node12. This was working fine until 3 weeks back. Now, I get the error that AWS doesn't support creating/updating Lambdas with Node12. So, I was forced to migrate the code to Node18. But now, my custom resource gets stuck in Create. I have tested this Lambda separately. I have also tested using the sam local invoke. Everything works fine. But when I put this updated zip in S3 and execute it using sam deploy, it gets stuck in create.

Can anyone please help?

  • Is there any error showing in logs like timeout or something else?

  • No. But it looks like the value returned by Lambda is not reaching the Custom Resource which is why it is hanging. The https.request is showing a response status of 403. I don't know what permissions are missing, since this was working fine with Node 12. Also there is no documentation on how to use cfn-response with Node 18.

已提問 1 年前檢視次數 70 次
沒有答案

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

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

回答問題指南