-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathserverless.yml
More file actions
55 lines (55 loc) · 1.44 KB
/
serverless.yml
File metadata and controls
55 lines (55 loc) · 1.44 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
service: msu-liability-api-service
useDotEnv : true
plugins:
- serverless-offline
provider:
name: aws
runtime: nodejs20.x
environment:
JWT_SECRET : ${env:JWT_SECRET}
DATABASE_NAME : ${env:DATABASE_NAME}
DATABASE_HOST : ${env:DATABASE_HOST}
DB_USER : ${env:DB_USER}
DB_PASSWORD : ${env:DB_PASSWORD}
ENV : ${env:ENV}
region: us-east-2 # Choose your desired region
# Attach necessary IAM roles/policies here
timeout: 20
iam:
role:
statements:
- Effect: "Allow"
Action:
- "lambda:InvokeFunction"
- "apigateway:*"
Resource: "*"
vpc:
securityGroupIds:
# Use the Security Group ID you provided
- sg-0d2785803611c75b8
subnetIds:
# Use the Subnet IDs you provided
- subnet-0c12494f0c3ee3fd5
# Note: You listed subnet-0c12494f0c3ee3fd5 twice, ensure you have the correct unique list if any are different
- subnet-0c370fabcfdfc5c8a
package:
# Exclude all files first
individually: true
patterns:
- '!**/*'
# Explicitly include the built JS file
- 'dist/**'
# Include node_modules if you marked any driver (like mssql) as external
- 'node_modules/**'
# Include package.json if you need it for runtime information
- 'package.json'
- 'index.js'
- '.env'
functions:
api:
handler: index.handler
events:
- http:
method: ANY
path: /{proxy+}
cors: true