Skip to content

assume .requirements.zip file is at lambda task root, fall back on the current directory #104

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

Merged
merged 2 commits into from
Nov 16, 2017

Conversation

sumpfork
Copy link
Contributor

We deploy our code to lambda in subdirectories. When importing unzip_requirements.py this results in os.path.split(__file__)[0] being empty, but .requirements.zip actually being higher up in the directory tree.

I believe it's valid to always assume that .requirements.zip is at the path pointed to by the env var LAMBDA_TASK_ROOT or else the current working dir for lambda, at least as long as the lambda code doesn't change this before imports? At least this works for our projects, subdirs or not.

@dschep
Copy link
Contributor

dschep commented Nov 16, 2017

LGTM 👍

@dschep dschep merged commit 9cf3e92 into serverless:master Nov 16, 2017
dschep added a commit that referenced this pull request Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants