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.

asked a year ago60 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions