-
Notifications
You must be signed in to change notification settings - Fork 8
/
serverless.yml
57 lines (51 loc) · 1.13 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
service: api-service-integration
frameworkVersion: '2'
provider:
name: aws
runtime: nodejs14.x
lambdaHashingVersion: 20201221
region: eu-west-1
package:
individually: true
plugins:
- serverless-webpack
- serverless-apigateway-service-proxy
custom:
webpack:
webpackConfig: 'webpack.config.js'
packager: 'yarn'
includeModules: true
apiGatewayServiceProxies:
- sqs:
path: /sqs
method: post
queueName: !GetAtt SQSQueue.QueueName
cors: true
response:
template:
success: |
{
"success": true
}
serverError: |
{
"success": false,
"errorMessage": "Server Error"
}
clientError: |
{
"success": false,
"errorMessage": "Client Error"
}
functions:
echo:
handler: src/echo/index.handler
events:
- sqs:
arn: !GetAtt SQSQueue.Arn
batchSize: 10
maximumBatchingWindow: 10
resources:
Resources:
SQSQueue:
Type: 'AWS::SQS::Queue'