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
Unable to switch from AWS Layer to specifying locally built editable pip3 packages when executing function:
I'm both learning python and attempting to build multiple lambdas that will both store and process Spotify listening history. I originally wrote one lambda with all dependencies packaged in the same directory and imported using relative paths.
Once creating similar functions which use the same dependencies, I've split the dependencies from the function and built them using pip3 and setup.py. When running pip3 list I can see the packages as expected. To execute the function locally using sam build && sam local invoke SpotifyPlayHistoryListener --env-vars env.json --event events/event.json and verify success, I'm specifying a layer I've built - this works!
To avoid having to rebuild the layer and modifying my function, I'd like to be able to revert to using a requirements.txt file and removing the specified layer.
Steps to reproduce the issue:
Build local editable package - pip3 install -e .
Specify in requirements.txt
sam build && sam local invoke SpotifyPlayHistoryListener --env-vars env.json --event events/event.json
Observed result:
Building resource 'SpotifyPlayHistoryListener'
Running PythonPipBuilder:ResolveDependencies
Build Failed
Error: PythonPipBuilder:ResolveDependencies - Could not satisfy the requirement: spotify-client
Expected result:
Build succeeds and function executes successfully.
Additional environment details:
I'm able to execute the function locally using sam build && sam local invoke SpotifyPlayHistoryListener --env-vars env.json --event events/event.json when specfying dependencies using a Layer
I'm open to being told I'm completely off the mark here. Though I feel like I'm not a million miles away.
The text was updated successfully, but these errors were encountered:
Unable to switch from AWS Layer to specifying locally built editable pip3 packages when executing function:
I'm both learning python and attempting to build multiple lambdas that will both store and process Spotify listening history. I originally wrote one lambda with all dependencies packaged in the same directory and imported using relative paths.
Once creating similar functions which use the same dependencies, I've split the dependencies from the function and built them using pip3 and setup.py. When running
pip3 list
I can see the packages as expected. To execute the function locally usingsam build && sam local invoke SpotifyPlayHistoryListener --env-vars env.json --event events/event.json
and verify success, I'm specifying a layer I've built - this works!To avoid having to rebuild the layer and modifying my function, I'd like to be able to revert to using a requirements.txt file and removing the specified layer.
Steps to reproduce the issue:
pip3 install -e .
sam build && sam local invoke SpotifyPlayHistoryListener --env-vars env.json --event events/event.json
Observed result:
Expected result:
Build succeeds and function executes successfully.
Additional environment details:
I'm able to execute the function locally using
sam build && sam local invoke SpotifyPlayHistoryListener --env-vars env.json --event events/event.json
when specfying dependencies using a LayerI'm open to being told I'm completely off the mark here. Though I feel like I'm not a million miles away.
The text was updated successfully, but these errors were encountered: