-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
53 lines (50 loc) · 1.25 KB
/
serverless.yml
File metadata and controls
53 lines (50 loc) · 1.25 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
service: rng-program-api
provider:
name: aws
runtime: nodejs20.x
region: us-east-1
profile: luis-super
deploymentBucket:
name: rng-program-api-dev
iamRoleStatements:
- Effect: Allow
Action:
- secretsmanager:GetSecretValue
Resource: arn:aws:secretsmanager:us-east-1:263057512714:secret:RNGProgramSecrets-*
functions:
api:
handler: api/server.handler
timeout: 150 # Increase this value (in seconds)
events:
- http:
path: api/v1/{network}/{endpoint}
method: any
cors: true
private: true
resources:
Resources:
ApiGatewayApiKey:
Type: 'AWS::ApiGateway::ApiKey'
Properties:
Name: 'RNGProgramAPIKey'
Enabled: true
StageKeys:
- RestApiId:
Ref: 'ApiGatewayRestApi'
StageName: 'dev'
UsagePlan:
Type: 'AWS::ApiGateway::UsagePlan'
Properties:
UsagePlanName: 'RNGProgramAPIUsagePlan'
ApiStages:
- ApiId:
Ref: 'ApiGatewayRestApi'
Stage: 'dev'
UsagePlanKey:
Type: 'AWS::ApiGateway::UsagePlanKey'
Properties:
KeyId:
Ref: 'ApiGatewayApiKey'
KeyType: 'API_KEY'
UsagePlanId:
Ref: 'UsagePlan'