Closed AllanOricil closed 2 months ago
Upon further inspecting I discovered where the issue is comming from. This experimental edge function construct generates a function which requires (@aws-sdk/client-ssm). Somehow there is a parameter from ssm that this autogenerated function can't find.
Hi @AllanOricil ,
The error you are seeing means that the SSM service cant find the requested resource, in this case the parameter this auto generated lambda function is asking for doesn't exist.
I can see that there is something called "CrossRegionStringParameterReader" failing, my guess is that this entity is trying to access a resource in an incorrect region.
Your auto generated lambda has some log statements. You need to see where these logs are printed to, make note of the parameter value and region and compare it to where those actual parameters live upstream. There is a chance this SSM client is being automatically created in an incorrect region.
This seems like a more CDK related issue w.r.t how this function is created and populated. Im going to ask you to open this issue on the CDK repo instead.
Thanks, Ran~
I think the issue was caused because I forgot that I also needed to bootstrap us-east-1
in my aws account. However, I can't be sure if it will work, because I have not tried to deploy my edge function again after bootstrapping that region.
I just wanted to share this information in case someone one day finds this page indexed in Google after searching for the same error message.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Checkboxes for prior research
Describe the bug
I can no longer deploy lambda edge functions to AWS using cdk. The error comes from AWS server, from a process that uses @aws-sdk/client-ssm, as you can show in the picture below.
This is my lambda function. It is adds some CSP and other headers to my static site that is served by cloudfront.
This is my construct
SDK version number
@aws-sdk/client-ssm
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
Im using node 18.19.1 but the error message comes from the Cloudformation server that is using your library, and because of that I really don't know what version of node this service is using.
Reproduction Steps
Use node 18.19.1 like I'm using Im also using macos
Observed Behavior
A server side exception is thrown in a step which is doing something to my lambda function after it has being "uploaded" to AWS via cloudformation.
Expected Behavior
lambda function should not thrown any exception
Possible Solution
No idea. I was able to deploy it without a problem 1 months ago.
Additional Information/Context
No response