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
e.g., https://github.com/awslabs/aws-lambda-web-adapter/blob/main/examples/fastapi-response-streaming-zip/app/run.sh#L4 is setting PYTHONPATH to LAMBDA_TASK_ROOT, which led to the search path (more background in Working with .zip file archives for Python Lambda functions) becoming ['', '/var/task', '/var/task', '/var/lang/lib/python38.zip', '/var/lang/lib/python3.8', '/var/lang/lib/python3.8/lib-dynload', '/var/lang/lib/python3.8/site-packages']. The second and third element are duplicate. And even worse, $LAMBDA_RUNTIME_DIR isn't in the search path any more, which led to the user won't be able to use the bundled modules under $LAMBDA_RUNTIME_DIR (e.g., boto3 SDK, which a user may not bundle into their zip archive to stay under the unzipped size limit).
The text was updated successfully, but these errors were encountered:
renjiexu-amzn
added a commit
to renjiexu-amzn/aws-lambda-web-adapter
that referenced
this issue
Apr 26, 2024
Thanks for reporting this issue. This affects python runtimes below 3.11. From 3.11 and above versions, AWS SDK is installed in /var/lang/lib/python3.x/site-packages.
renjiexu-amzn
added a commit
to renjiexu-amzn/aws-lambda-web-adapter
that referenced
this issue
Apr 26, 2024
e.g., https://github.com/awslabs/aws-lambda-web-adapter/blob/main/examples/fastapi-response-streaming-zip/app/run.sh#L4 is setting
PYTHONPATH
toLAMBDA_TASK_ROOT
, which led to the search path (more background in Working with .zip file archives for Python Lambda functions) becoming['', '/var/task', '/var/task', '/var/lang/lib/python38.zip', '/var/lang/lib/python3.8', '/var/lang/lib/python3.8/lib-dynload', '/var/lang/lib/python3.8/site-packages']
. The second and third element are duplicate. And even worse,$LAMBDA_RUNTIME_DIR
isn't in the search path any more, which led to the user won't be able to use the bundled modules under$LAMBDA_RUNTIME_DIR
(e.g., boto3 SDK, which a user may not bundle into their zip archive to stay under the unzipped size limit).The text was updated successfully, but these errors were encountered: