-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless-python.yml
More file actions
68 lines (63 loc) · 1.55 KB
/
Copy pathserverless-python.yml
File metadata and controls
68 lines (63 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
service: alexa-wine-skill-python
provider:
name: aws
runtime: python3.9
region: ${env:AWS_REGION, 'us-east-1'}
stage: ${opt:stage, 'dev'}
memorySize: 256
timeout: 30
environment:
WINE_API_BASE_URL: ${env:WINE_API_BASE_URL, 'https://api.sampleapis.com/wines'}
ALEXA_SKILL_ID: ${env:ALEXA_SKILL_ID}
LOG_LEVEL: ${env:LOG_LEVEL, 'info'}
# Enable DynamoDB-backed search via environment flags
USE_DYNAMODB: ${env:USE_DYNAMODB, 'false'}
DYNAMODB_TABLE_PREFIX: ${env:DYNAMODB_TABLE_PREFIX, 'wine_skill_'}
iamRoleStatements:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource: "arn:aws:logs:*:*:*"
- Effect: Allow
Action:
- bedrock:InvokeModel
Resource: "*"
functions:
alexaSkill:
handler: lambda_function.lambda_handler
events:
- alexaSkill:
appId: ${env:ALEXA_SKILL_ID}
enabled: true
package:
include:
- lambda_function.py
- config.py
- utils.py
- wine_service.py
- wine_api_service.py
- wine_dynamodb_service.py
- wineDatabase.json
- .env
exclude:
- node_modules/**
- Tests/**
- coverage/**
- "*.js"
- "*.json"
- "!wineDatabase.json"
- test_*.py
- __pycache__/**
- "*.pyc"
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: false
slim: true
strip: false
noDeps:
- boto3
- botocore