Deploying on AWS App Runner

Has anybody successfully deployed a Streamlit app on AWS App Runner?

I’ve tried so many different variants of the apprunner.yaml file, but it refuses to deploy

I struggle with it right now… I tried so many things and it always fails. My latest status is using the following Dockerfile:

# syntax=docker/dockerfile:1.4
FROM public.ecr.aws/docker/library/python:3.12.2-slim
WORKDIR /app
ENV PATH="/root/.local/bin:${PATH}"
RUN pip install pipx \
    && pipx install poetry
COPY acetube_streamlit ./acetube_streamlit
COPY pyproject.toml .
COPY poetry.lock .
COPY README.md .
RUN poetry install
EXPOSE 80
ENTRYPOINT ["poetry",\
    "run", \
    "streamlit", \
    "run", \
    "acetube_streamlit/gui_app.py", \
    "--server.port=80", \
    "--server.address=0.0.0.0"\
    ]

I tried also with port 8501, but the best I got was that the URL created by App Runner could be opened and it looked like streamlit starts, but nothing happned. It looked like this:

N.B.: I played with it a little more and now I start the app using entrypoint.sh script that’s set in the ENTRYPOINT of the image. I also updated the health check to check the default /healthz provided by streamlit. Still, I get this page in the screenshot… :frowning: The only positive thing is that I’m able to open https://2u7[something].us-east-1.awsapprunner.com/healthz and I get OK. It means that the app is running. I suspect that the ports are not configured correctly in sync between the image and the App Runner.

N.B. 2: I was able to deploy it using web app provided by DigitalOcean.