mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Adding serverless script
This commit is contained in:
parent
09df555b2b
commit
9d60c8998e
2 changed files with 34 additions and 1 deletions
|
|
@ -56,4 +56,3 @@ async def validate_token(token: str = Depends(oauth2_scheme), request: Request =
|
|||
status_code=status.HTTP_403_FORBIDDEN, detail="Could not validate credentials"
|
||||
)
|
||||
return token
|
||||
|
||||
|
|
|
|||
34
backend/serverless.yml
Normal file
34
backend/serverless.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
service: fastapi-lambda
|
||||
|
||||
provider:
|
||||
name: aws
|
||||
runtime: python3.10
|
||||
region: eu-west-2
|
||||
environment:
|
||||
API_KEY: ${env:API_KEY}
|
||||
ENVIRONMENT: ${self:provider.stage}
|
||||
SECRET_KEY: ${env:SECRET_KEY}
|
||||
ALGORITHM: ${env:ALGORITHM}
|
||||
|
||||
package:
|
||||
individually: true
|
||||
|
||||
plugins:
|
||||
- serverless-python-requirements
|
||||
|
||||
custom:
|
||||
pythonRequirements:
|
||||
dockerizePip: non-linux
|
||||
|
||||
functions:
|
||||
app:
|
||||
handler: app.main.handler
|
||||
events:
|
||||
- http: ANY /
|
||||
- http: 'ANY {proxy+}'
|
||||
# vpc:
|
||||
# securityGroupIds:
|
||||
# - sg-0abcd1234efgh5678
|
||||
# subnetIds:
|
||||
# - subnet-a1b2c3d4
|
||||
# - subnet-e5f6g7h8
|
||||
Loading…
Add table
Reference in a new issue