This repository was archived by the owner on Jul 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
57 lines (53 loc) · 1.34 KB
/
serverless.yml
File metadata and controls
57 lines (53 loc) · 1.34 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
service: resize
provider:
name: aws
runtime: nodejs12.x
stage: ${opt:stage, 'prod'}
timeout: 30
region: eu-west-1
vpc:
securityGroupIds:
- ${ssm:/API/SecurityGroup}
subnetIds:
- ${ssm:/API/Subnet}
environment:
stage: ${self:provider.stage}
BUCKET_NAME: ${ssm:/API/ProfilePictures/BucketName}
BUCKET_REGION: ${ssm:/API/ProfilePictures/BucketRegion}
AWS_KEY_ID: ${ssm:/resize/AwsKeyId}
AWS_KEY_SECRET: ${ssm:/resize/AwsKeySecret~true}
DB_PROXY_HOST: ${ssm:/DB/Proxy/Host}
DB_HOST: ${ssm:/DB/Host}
DB_PORT: ${ssm:/DB/Port}
DB_NAME: ${ssm:/DB/Name}
DB_USER: ${ssm:/resize/DB/User}
DB_PASSWORD: ${ssm:/resize/DB/Password~true}
IMG_SECRET: ${ssm:/resize/secret~true}
functions:
resize:
handler: src/handler.resize
events:
- s3:
bucket: ${ssm:/API/ProfilePictures/BucketName}
event: s3:ObjectCreated:*
existing: true
transform:
handler: src/handler.transform
events:
- http:
method: POST
path: /process
- sns:
arn: ${ssm:/resize/SNS/arn}
maximumRetryAttempts: 2
plugins:
- serverless-webpack
- serverless-offline
- serverless-dotenv-plugin
custom:
serverless-offline:
port: 9000
webpack:
webpackConfig: 'webpack.config.js'
packager: 'npm'
includeModules: true