mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
testing moving runtime to function level
This commit is contained in:
parent
82452150fc
commit
1d81db508d
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue