-
Notifications
You must be signed in to change notification settings - Fork 4
/
serverless.yml
50 lines (47 loc) · 1.42 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
service: erc721validator-api
provider:
name: aws
runtime: nodejs12.x
region: eu-central-1
iamRoleStatements:
- Effect: Allow
Action:
- s3:PutObject
- s3:PutObjectAcl
Resource: "arn:aws:s3:::erc721validator/*"
stage: ${opt:stage, 'test'}
environment:
APP_ENV: ${file(./.serverless-env/${opt:stage, self:provider.stage, 'test'}.json):APP_ENV}
APP_SECRET: ${file(./.serverless-env/${opt:stage, self:provider.stage, 'test'}.json):APP_SECRET}
ETH_MAINNET_URL: ${file(./.serverless-env/${opt:stage, self:provider.stage, 'test'}.json):ETH_MAINNET_URL}
ETH_RINKEBY_URL: ${file(./.serverless-env/${opt:stage, self:provider.stage, 'test'}.json):ETH_RINKEBY_URL}
ETH_ROPSTEN_URL: ${file(./.serverless-env/${opt:stage, self:provider.stage, 'test'}.json):ETH_ROPSTEN_URL}
plugins:
- serverless-domain-manager
custom:
customDomain:
domainName: api.erc721validator.org
basePath: ""
certificateName: 'erc721validator.org'
createRoute53Record: true
createRoute53IPv6Record: true
endpointType: 'regional'
securityPolicy: tls_1_2
apiType: rest
autoDomain: true
functions:
# Start Ethereum gateway.
rest:
handler: dist/scripts/lambda.handler
events:
- http:
path: '{proxy+}'
method: ANY
cors:
origin: '*'
- http:
path: '/'
method: ANY
cors:
origin: '*'
timeout: 30 # api gateway limit is 30