-
Notifications
You must be signed in to change notification settings - Fork 482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug serverless application with layer defined in the same template.yaml #1263
Comments
Related: #746 . Consider adding an upvote 👍 to that issue. |
Same problem here, my workaround at the moment is to reference the canonical Arn in the portal.
Although that throws a CloudFormation error when the changes get pushed onto the pipeline. The workaround above will only unblock you from testing locally. Before pushing the changes to Git you'll have to revert to the layer logical ID, a bit of a hassle. |
Same problem here |
Can you confirm if the 1.18 release helps/fixes this? |
I have successfully been able to debug a lambda referencing a local Layer defined in the same yaml file. So the 1.18 release satisfies my personal needs. It allows me to maintain a set of code in a locally managed Layer shared by my serverless application lambdas without explicitly and separately publishing a global Layer. Thanks for getting this done! |
weaverbird: remove reject and discuss button
I have a serverless application that is a collection of cooperating Lambdas. These Lambdas have common code which is stable and that I'd like to put in a layer that exists only for this application (things like database table definitions). That way if I do need to change the code it will flow through to all the other Lambdas without requiring a lot of manual edits. I've created a layer within the template.yaml file with the name AppUtilitiesLayer and have assigned it to the Lambdas as - !Ref AppUtilitiesLayer
When I use SAM to build and deploy this to AWS it works correctly. However when I try to debug the Lambda in Visual Studio Code I get a message that says "Error with child process: Error: AppUtilitiesLayer is an Invalid Layer Arn."
I don't care about stepping through code in the Layer since this is stable code and shouldn't need to be debugged very often. If I build the layer independently in a separate template.yaml file the debugger doesn't have a problem. However the common code is specific to this particular serverless application and it makes sense to keep it as part of the application instead of requiring a separate build.
I am asking for functionality to debug a Lambda that has a layer defined in the same template.yaml file. Don't care about stepping through code in the Layer though that would be awesome. Right now this is impossible. It would be a huge help in keeping the code organized. Keeping common code synchronized across different Lambdas in the same application has been difficult at times.
Hope this isn't too hard. Thanks
The text was updated successfully, but these errors were encountered: