Skip to content

Commit

Permalink
[#453] Update the Fast API run script examples to include LAMBDA_RUNT…
Browse files Browse the repository at this point in the history
…IME_DIR in search path. (#454)
  • Loading branch information
renjiexu-amzn authored Apr 27, 2024
1 parent 172405e commit 7709bb4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/bedrock-agent-fastapi-zip/app/run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

PATH=$PATH:$LAMBDA_TASK_ROOT/bin:/opt/bin PYTHONPATH=$LAMBDA_TASK_ROOT:/opt/python exec python -m uvicorn --port=$PORT main:app
PATH=$PATH:$LAMBDA_TASK_ROOT/bin:/opt/bin PYTHONPATH=/opt/python:$LAMBDA_RUNTIME_DIR exec python -m uvicorn --port=$PORT main:app
2 changes: 1 addition & 1 deletion examples/fastapi-response-streaming-zip/app/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

PATH=$PATH:$LAMBDA_TASK_ROOT/bin \
PYTHONPATH=$LAMBDA_TASK_ROOT:$PYTHONPATH:/opt/python \
PYTHONPATH=$PYTHONPATH:/opt/python:$LAMBDA_RUNTIME_DIR \
exec python -m uvicorn --port=$PORT main:app
2 changes: 1 addition & 1 deletion examples/fastapi-zip/app/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

PATH=$PATH:$LAMBDA_TASK_ROOT/bin \
PYTHONPATH=$LAMBDA_TASK_ROOT:$PYTHONPATH:/opt/python \
PYTHONPATH=$PYTHONPATH:/opt/python:$LAMBDA_RUNTIME_DIR \
exec python -m uvicorn --port=$PORT main:app
2 changes: 1 addition & 1 deletion examples/flask-zip/app/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

PATH=$PATH:$LAMBDA_TASK_ROOT/bin \
PYTHONPATH=$LAMBDA_TASK_ROOT:$PYTHONPATH:/opt/python \
PYTHONPATH=$PYTHONPATH:/opt/python:$LAMBDA_RUNTIME_DIR \
exec python -m gunicorn -b=:$PORT -w=1 app:app

0 comments on commit 7709bb4

Please sign in to comment.