forked from arielweinberger/sls-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
37 lines (31 loc) · 802 Bytes
/
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
service:
name: notification-service
plugins:
- serverless-bundle
- serverless-pseudo-parameters
provider:
name: aws
region: eu-west-3
runtime: nodejs12.x
memorySize: 256
stage: ${opt:stage, 'dev'}
iamRoleStatements:
- ${file(iam/sendMailIAM.yml):sendEmailIAM}
resources:
Resources:
MailQueue: ${file(resources/MailQueue.yml):MailQueue}
Outputs:
MailQueueArn: ${file(resources/MailQueue.yml):Outputs.MailQueueArn}
MailQueueUrl: ${file(resources/MailQueue.yml):Outputs.MailQueueUrl}
functions:
sendMail:
handler: src/handlers/sendMail.handler
events:
- sqs:
arn: ${self:custom.mailQueue.arn}
batchSize: 1
custom:
mailQueue:
name: MailQueue-${self:provider.stage}
arn: !GetAtt MailQueue.Arn
url: !Ref MailQueue