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
Hey there! Awesome library! I am running into some issues. I hope the community here can help me troubleshoot them. I am attempting to run hrequests in Lambda to interact with specific web pages when a function URL is called.
I am using the AWS SDK to deploy a Docker container similar to the following to ECR -> Lambda:
FROM mcr.microsoft.com/playwright/python:v1.34.0-jammy
# Include global arg in this stage of the build
ARG FUNCTION_DIR
RUN mkdir -p ${FUNCTION_DIR}
COPY app.py ${FUNCTION_DIR}
WORKDIR /app
COPY ./mytool/pyproject.toml ./mytool/poetry.lock /app/
COPY ./mytool/. /app
# Install dependencies using poetry
RUN pip install --no-cache-dir poetry awslambdaric aws-xray-sdk sh \
&& poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
RUN python -m playwright install-deps
RUN python -m playwright install
WORKDIR ${FUNCTION_DIR}
ENTRYPOINT [ "/usr/bin/python", "-m", "awslambdaric" ]
CMD [ "app.handler" ]
An app.py file similar to the following is then called using said function URL via awslambdaric:
This app.py code is calling a separate tool I have created that utilizes hrequests for navigation and interaction with web pages. When calling the app.py file with the function URL, however, the following error is returned from hrequests specifically:
The container image runs just fine on my local system with similar resource allocations specified
I can call my tool remotely, and it appears to run partially before hitting this exception
I have increased memory allocation to the Lambda function several times without success.
My tool is always hitting the lambda timeout value set no matter how high so I suspect this error is occurring and locking the application entirely.
I am not experienced with playwright and headless browser usage, so any help would be greatly appreciated. I understand this is not directly related to hrequests, but I hope the community here is familiar enough with the frameworks to assist. Thanks!
The text was updated successfully, but these errors were encountered:
Hey there! Awesome library! I am running into some issues. I hope the community here can help me troubleshoot them. I am attempting to run hrequests in Lambda to interact with specific web pages when a function URL is called.
I am using the AWS SDK to deploy a Docker container similar to the following to ECR -> Lambda:
An app.py file similar to the following is then called using said function URL via awslambdaric:
This app.py code is calling a separate tool I have created that utilizes hrequests for navigation and interaction with web pages. When calling the app.py file with the function URL, however, the following error is returned from hrequests specifically:
Some notes on what has already been attempted:
I am not experienced with playwright and headless browser usage, so any help would be greatly appreciated. I understand this is not directly related to hrequests, but I hope the community here is familiar enough with the frameworks to assist. Thanks!
The text was updated successfully, but these errors were encountered: