mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +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:
|
provider:
|
||||||
name: aws
|
name: aws
|
||||||
region: eu-west-2
|
region: eu-west-2
|
||||||
runtime: python3.11
|
|
||||||
architecture: x86_64
|
architecture: x86_64
|
||||||
environment:
|
environment:
|
||||||
API_KEY: ${env:API_KEY}
|
API_KEY: ${env:API_KEY}
|
||||||
|
|
@ -46,7 +45,9 @@ custom:
|
||||||
|
|
||||||
functions:
|
functions:
|
||||||
|
|
||||||
|
# ZIP-based Lambda (FastAPI)
|
||||||
fastapi-backend:
|
fastapi-backend:
|
||||||
|
runtime: python3.11
|
||||||
handler: backend.app.main.handler
|
handler: backend.app.main.handler
|
||||||
timeout: 600
|
timeout: 600
|
||||||
memorySize: 512
|
memorySize: 512
|
||||||
|
|
@ -56,6 +57,7 @@ functions:
|
||||||
path: /{proxy+}
|
path: /{proxy+}
|
||||||
method: ANY
|
method: ANY
|
||||||
|
|
||||||
|
# TRUE container-image Lambda (4 GB+ supported)
|
||||||
model-engine-lambda:
|
model-engine-lambda:
|
||||||
image:
|
image:
|
||||||
uri: ${env:ECR_URI}:${env:GITHUB_SHA}
|
uri: ${env:ECR_URI}:${env:GITHUB_SHA}
|
||||||
|
|
@ -66,16 +68,16 @@ functions:
|
||||||
- sqs:
|
- sqs:
|
||||||
arn: arn:aws:sqs:${self:provider.region}:${aws:accountId}:model-engine-queue
|
arn: arn:aws:sqs:${self:provider.region}:${aws:accountId}:model-engine-queue
|
||||||
batchSize: 1
|
batchSize: 1
|
||||||
maximumConcurrency: 12 # Heavily restricts concurrency to avoid overwhelming the ldmbda limits
|
maximumConcurrency: 12
|
||||||
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
Resources:
|
Resources:
|
||||||
|
|
||||||
EngineQueue:
|
EngineQueue:
|
||||||
Type: AWS::SQS::Queue
|
Type: AWS::SQS::Queue
|
||||||
Properties:
|
Properties:
|
||||||
QueueName: model-engine-queue
|
QueueName: model-engine-queue
|
||||||
VisibilityTimeout: 910 # must be >= lambda timeout (900)
|
VisibilityTimeout: 910
|
||||||
|
|
||||||
FastApiLambdaRole:
|
FastApiLambdaRole:
|
||||||
Type: AWS::IAM::Role
|
Type: AWS::IAM::Role
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue