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.

gefragt vor einem Jahr70 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen