deploy test lambda - create pashub_to_ara ecr

This commit is contained in:
Daniel Roth 2026-03-25 14:12:38 +00:00
parent 64b46f8512
commit c233d9117b
4 changed files with 26 additions and 9 deletions

View file

@ -4,9 +4,6 @@ FROM mcr.microsoft.com/playwright/python:v1.58.0-jammy
ADD https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie /usr/local/bin/aws-lambda-rie
RUN chmod +x /usr/local/bin/aws-lambda-rie
# Install Lambda runtime client
RUN pip install awslambdaric playwright==1.58.0 requests msal openpyxl
# Set working directory (Lambda task root)
WORKDIR /var/task
@ -15,6 +12,7 @@ COPY .env backend/.env
COPY utils/ utils/
COPY backend/pashub_fetcher/ backend/pashub_fetcher/
RUN pip install --no-cache-dir -r requirements.txt
# Lambda entrypoint
ENTRYPOINT ["/usr/local/bin/aws-lambda-rie", "python", "-m", "awslambdaric"]
@ -22,6 +20,4 @@ ENTRYPOINT ["/usr/local/bin/aws-lambda-rie", "python", "-m", "awslambdaric"]
# -----------------------------
# Lambda handler
# -----------------------------
# CMD ["backend/pashub_fetcher/handler/handler.handler"]
# For local running
CMD ["backend.pashub_fetcher.handler.handler.handler"]
CMD ["backend.pashub_fetcher.handler.test_handler.handler"]

View file

@ -0,0 +1,5 @@
awslambdaric
playwright==1.58.0
requests
msal
openpyxl

View file

@ -0,0 +1,7 @@
from typing import Any, Mapping
import json
def handler(event: Mapping[str, Any], context: Any) -> None:
print("Received event:")
print(json.dumps(event, indent=2))

View file

@ -525,14 +525,23 @@ output "ordnance_s3_read_and_write_arn" {
}
################################################
# Engine Lambda ECR
# Pas Hub to Ara Lambda
################################################
module "engine_state_bucket" {
module "pashub_to_ara_state_bucket" {
source = "../modules/tf_state_bucket"
bucket_name = "ara-engine-terraform-state"
bucket_name = "pashub-to-ara-terraform-state"
}
module "pashub_to_ara_registry" {
source = "../modules/container_registry"
name = "pashub_to_ara"
stage = var.stage
}
################################################
# Engine Lambda ECR
################################################
module "engine_registry" {
source = "../modules/container_registry"
name = "engine"