From ad04ccb2739ddd69d08a123fbb4c0a9f2ee096ce Mon Sep 17 00:00:00 2001 From: "W. Evan Sheehan" Date: Fri, 5 May 2023 13:12:51 -0600 Subject: [PATCH] Move the Dockerfile for Lambda to the API service MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename the Dockerfile for the Lambda function to Dockerfile-diag-etl in the API service. Update it to run the handler function from the unified_graphics package instead of ugdata. I’m pretty sure this is all we need to do to get this working. It feels a little bad installing the whole unified_graphics package in the container for the Lambda function, since it doesn’t need Flask or anything like that. Maybe we can look into groups in poetry to at least reduce the size of the dependencies. --- services/{data/Dockerfile => api/Dockerfile-diag-etl} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename services/{data/Dockerfile => api/Dockerfile-diag-etl} (80%) diff --git a/services/data/Dockerfile b/services/api/Dockerfile-diag-etl similarity index 80% rename from services/data/Dockerfile rename to services/api/Dockerfile-diag-etl index 9dcd0328..07da655b 100644 --- a/services/data/Dockerfile +++ b/services/api/Dockerfile-diag-etl @@ -11,6 +11,6 @@ COPY poetry.lock . RUN poetry export --format requirements.txt --without dev --without-hashes --output requirements.txt \ && pip install --target "${LAMBDA_TASK_ROOT}" --requirement requirements.txt -COPY src/ugdata/ "${LAMBDA_TASK_ROOT}/ugdata" +COPY src/unified_graphics/ "${LAMBDA_TASK_ROOT}/unified_graphics" -CMD ["ugdata.aws.lambda_handler"] +CMD ["unified_graphics.etl.aws.lambda_handler"]