Skip to content

Commit

Permalink
Updated fastapi example
Browse files Browse the repository at this point in the history
  • Loading branch information
ulises-jeremias committed Aug 29, 2023
1 parent 890ac35 commit 944f39c
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions examples/serverless-python-fastapi/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@ useDotenv: true
package:
individually: true
excludeDevDependencies: true
exclude:
- "**"
include:
- "!./**"
- "**/*.py"
exclude:
- "**"

custom:
pythonRequirements:
dockerizePip: true
layer: true
noDeploy:
- pytest

serverless-offline:
httpPort: 3000
port: 3000
Expand All @@ -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
Expand Down

0 comments on commit 944f39c

Please sign in to comment.