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.

demandé il y a un an70 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions