From 944f39c0492c31e4fe99037cdc21807b0992bbc4 Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Tue, 29 Aug 2023 00:50:36 -0300 Subject: [PATCH] Updated fastapi example --- .../serverless-python-fastapi/serverless.yml | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/examples/serverless-python-fastapi/serverless.yml b/examples/serverless-python-fastapi/serverless.yml index 37e7b4b..608e79a 100644 --- a/examples/serverless-python-fastapi/serverless.yml +++ b/examples/serverless-python-fastapi/serverless.yml @@ -12,11 +12,11 @@ useDotenv: true package: individually: true excludeDevDependencies: true + exclude: + - "**" include: - "!./**" - "**/*.py" - exclude: - - "**" custom: pythonRequirements: @@ -24,7 +24,6 @@ custom: layer: true noDeploy: - pytest - serverless-offline: httpPort: 3000 port: 3000 @@ -40,32 +39,17 @@ provider: blockPublicAccess: true versioning: true serverSideEncryption: AES256 - iamRoleStatements: - - Effect: Allow - Action: - - lambda:InvokeFunction - - lambda:InvokeAsync - Resource: "*" functions: app: runtime: python3.9 - package: - patterns: - - "src/**" - - "env.providers.json" - - "!requirements.txt" - - "!requirements.dev.txt" - - "!README.md" - - "!setup.cfg" - - "!package.json" - - "!package-lock.json" - - "!.serverless/**" - - "!venv/**" - - "!node_modules/**" module: src handler: main.handler events: + - http: + path: / + method: ANY + cors: true - http: path: /{proxy+} method: ANY