generated from snek-functions/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
66 lines (59 loc) · 1.54 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
service: authenticaton
frameworkVersion: '3'
useDotenv: true
plugins:
- serverless-offline
- serverless-plugin-ifelse
custom:
isOffline: ${env:IS_OFFLINE, "false"}
serverlessIfElse:
- If: '"${self:custom.isOffline}" != "true"'
Exclude:
- functions.endpoint.handler
- provider.environment.AWS_ACCESS_KEY_ID
- provider.environment.AWS_SECRET_ACCESS_KEY
- provider.environment.CODESPACE_NAME
- provider.environment.HOME
ElseExclude:
- functions.endpoint.image
provider:
name: aws
region: eu-central-1
environment:
AWS_ACCESS_KEY_ID: ${env:AWS_ACCESS_KEY_ID, ""}
AWS_SECRET_ACCESS_KEY: ${env:AWS_SECRET_ACCESS_KEY, ""}
CODESPACE_NAME: ${env:CODESPACE_NAME, ""}
ENDPOINT_URL_FACEBOOK: ${env:ENDPOINT_URL_FACEBOOK, ""}
HOME: '/tmp'
DUCKDB_DATA_PATH: '/var/duckdb'
iam:
role:
statements:
# Allow functions to list all buckets
- Effect: Allow
Action: 's3:ListBucket'
Resource: '*'
# Allow functions to read/write objects in a bucket
- Effect: Allow
Action:
- 's3:GetObject'
#- 's3:PutObject'
Resource:
- 'arn:aws:s3:::snekauth/*'
ecr:
images:
appimage:
path: ./
functions:
endpoint:
image:
name: appimage
command:
- dist/app.handler
handler: dist/app.handler
events:
- httpApi:
path: '*'
method: '*'
# SPDX-License-Identifier: (EUPL-1.2)
# Copyright © 2019-2022 snek.at