-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
49 lines (44 loc) · 1.01 KB
/
serverless.yml
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
org: jpc02
app: workspace
service: create-invoice
provider:
name: aws
runtime: python3.8
environment:
S3_BUCKET_NAME: ${file(./config.yml):BucketName}
iam:
role:
name: "create-invoice-role"
statements:
- Effect: "Allow"
Action: "s3:*"
Resource:
- arn:aws:s3:::${file(./config.yml):BucketName}
- arn:aws:s3:::${file(./config.yml):BucketName}/*
- Effect: "Allow"
Action:
- ses:SendEmail
- ses:SendRawEmail
- dynamodb:UpdateItem
- dynamodb:GetItem
Resource: "*"
package:
patterns:
- "!node_modules/**"
- "!venv/**"
resources:
Resources:
NewResource:
Type: AWS::S3::Bucket
Properties:
BucketName: ${file(./config.yml):BucketName}
functions:
invoice:
handler: invoice.handler
layers:
- arn:aws:lambda:us-east-1:347599033421:layer:wkhtmltopdf-0_12_5:1
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: true