-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathserverless.yml
54 lines (46 loc) · 1.15 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
service: serverless-image-proxy
provider:
name: aws
runtime: nodejs6.10
memorySize: 1536
region: ${env:AWS_REGION}
deploymentBucket: serverless-deployments-${env:AWS_REGION}-${env:AWS_ACCOUNT_ID}
iamRoleStatements:
- Effect: Allow
Action:
- s3:GetObject
Resource: "arn:aws:s3:::files.graph.cool/*"
plugins:
- serverless-plugin-typescript
- serverless-apigwy-binary
package:
# exclude:
# - node_modules/**
# include:
# - node_modules/sharp/**
# - node_modules/lambda-helpers/**
excludeDevDependencies: false
functions:
Resize:
handler: src/handler.default
events:
- http:
path: '{proxy+}'
method: get
contentHandling: CONVERT_TO_BINARY
environment:
BUCKET_NAME: 'files.graph.cool'
GRAPHCOOL_ENDPOINT: ${env:GRAPHCOOL_ENDPOINT}
GRAPHCOOL_PAT: ${env:GRAPHCOOL_PAT}
resources:
Resources:
ResizeLogGroup:
Properties:
RetentionInDays: 7
pathmapping:
Type: AWS::ApiGateway::BasePathMapping
Properties:
DomainName: 'images-v1.graph.cool'
RestApiId:
Ref: ApiGatewayRestApi
Stage: dev