From 1d81db508df9dc3ef14d59f659900da889f7feb0 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 8 Jan 2026 13:13:41 +0000 Subject: [PATCH] testing moving runtime to function level --- serverless.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/serverless.yml b/serverless.yml index 9e57ca95..8ce5347f 100644 --- a/serverless.yml +++ b/serverless.yml @@ -3,7 +3,6 @@ service: retrofit-platform provider: name: aws region: eu-west-2 - runtime: python3.11 architecture: x86_64 environment: API_KEY: ${env:API_KEY} @@ -46,7 +45,9 @@ custom: functions: + # ZIP-based Lambda (FastAPI) fastapi-backend: + runtime: python3.11 handler: backend.app.main.handler timeout: 600 memorySize: 512 @@ -56,6 +57,7 @@ functions: path: /{proxy+} method: ANY + # TRUE container-image Lambda (4 GB+ supported) model-engine-lambda: image: uri: ${env:ECR_URI}:${env:GITHUB_SHA} @@ -66,16 +68,16 @@ functions: - sqs: arn: arn:aws:sqs:${self:provider.region}:${aws:accountId}:model-engine-queue batchSize: 1 - maximumConcurrency: 12 # Heavily restricts concurrency to avoid overwhelming the ldmbda limits - + maximumConcurrency: 12 resources: Resources: + EngineQueue: Type: AWS::SQS::Queue Properties: QueueName: model-engine-queue - VisibilityTimeout: 910 # must be >= lambda timeout (900) + VisibilityTimeout: 910 FastApiLambdaRole: Type: AWS::IAM::Role