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 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则