-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
62 lines (55 loc) · 1.49 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
58
59
60
61
62
service: serverless-basics-s3
frameworkVersion: "3"
configValidationMode: error
plugins:
- serverless-dotenv-plugin
- serverless-iamroles
provider:
name: aws
iam:
role:
statements:
- Effect: Allow
Action:
- sqs:*
- ses:*
- s3:*
Resource: "*"
managedPolicies:
- arn:aws:iam::657149196530:policy/ReadWriteObjectsPolicyForABucket
runtime: nodejs16.x
region: ap-south-1
deploymentMethod: direct
memorySize: 128
versionFunctions: false
functions:
fileUpload:
handler: src/services/fileUploadService.fileUploadHandler
events:
- httpApi: POST /upload
listContents:
handler: src/services/listContentsService.listContentsHandler
events:
- httpApi: GET /getcontents
iamRoleStatements:
- Effect: Allow
Action:
- s3:ListBucket
Resource: arn:aws:s3:::file-uploads-bucket-s3
greeting:
handler: src/services/greetingService.greetingHandler
events:
- httpApi: POST /greeting
cronfileUpload:
handler: src/services/cronFileUploadService.cronFileUploadServiceHandler
events:
- schedule: rate(5 minutes)
sendMessage:
handler: src/services/sendMessageQueueService.sendMessageQueueHandler
events:
- httpApi: POST /sendmessage
receiveMessage:
handler: src/services/receiveMessageQueueService.receiveMessageQueueHandler
events:
- sqs:
arn: arn:aws:sqs:ap-south-1:657149196530:simple-fifo-queue.fifo