- Newest
- Most votes
- Most comments
Solved it!
Turns out that as I had linked my Lambda to my VPC it actually prevents the function talking with Secrets Manager as those endpoints are all public https://repost.aws/questions/QU1WLg4Q2-TCqznkgmpPnW0g/getting-secret-from-lambda-times-out-when-attached-to-vpc-subnet
The solution for this was to create a VPC endpoint accepting requests from the security group which my lambda was in. After doing this, the extension works as expected.
Hope this helps someone else who faces the same issue 💫
Hi nifty,
I wrote an article recently about this integration: https://medium.com/aws-in-plain-english/potential-costs-and-latency-improvements-with-aws-parameters-and-secrets-lambda-extensions-40b6af151b0
Could you try with the the code in article to rule out whether the fetch method or some code is preventing you to perform the right call to the extension?
Only difference I can spot is usage of encodeURIComponent method in my implementation.
Relevant content
- How can I resolve the "ERROR: ˂module/extension˃ must be loaded via shared_preload_libraries" error?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Hi @alatech
Thanks for the reply and the link to your article. I added the layer again the style you described in your article and used the exact same code but sadly I have the same issue where it simply times out when requesting the secret
Glad it helped, wasnt aware the lambda was in a VPC, good!