You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to figure out how to add a Python dependency to my Lambda function. I shouldn't need stack overflow answers for this. This is something 90% of users will need to do and should be have documentation for.
I would argue any template that doesn't include support for this, is not really useful as this is such a fundamental thing.
Surely someone thought of this when creating these templates? If its something where there are multiple approaches there should be multiple template or guides to these approaches.
The text was updated successfully, but these errors were encountered:
Hi @JonathanWoollett-Light! Thanks for submitting this issue -- and you're right, it'd be good to provide an example of how to do this (or perhaps better, update all serverless templates to include this across the board). I'll leave this issue open to track that.
In the meantime, if you're still stuck, here's an example that might help.
It sounds like you're using the serverless-aws-python template. If you add the following lines to the top of that template, you can add a step to run pip install before the deployment begins, then let the template bundle the resulting assets into the Lambda function for you:
And finally, in ./www/index.html (just to get things to render right):
<h1>Serverless with Pulumi</h1><p>The current time is: </p><preid="date"></pre>.
<script>setInterval(()=>{fetch("date").then(response=>response.text()).then(data=>document.getElementById("date").innerText=data)},1000);</script>
Hello!
Issue details
It is normal to want to use non-std packages when writing Python code.
There should be a template with a workflow that supports this.
The current template https://www.pulumi.com/templates/serverless-application/aws/ does not support this.
I am currently trying to figure out how to add a Python dependency to my Lambda function. I shouldn't need stack overflow answers for this. This is something 90% of users will need to do and should be have documentation for.
I would argue any template that doesn't include support for this, is not really useful as this is such a fundamental thing.
Surely someone thought of this when creating these templates? If its something where there are multiple approaches there should be multiple template or guides to these approaches.
The text was updated successfully, but these errors were encountered: