testing moving runtime to function level

This commit is contained in:
Khalim Conn-Kowlessar 2026-01-08 13:13:41 +00:00
parent 82452150fc
commit 1d81db508d

View file

@ -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