-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.test.yml
47 lines (40 loc) · 1.08 KB
/
serverless.test.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
service: api-v2-iam-auth-TEST
frameworkVersion: '3'
custom:
stage: ${opt:stage, self:provider.stage}
sutApiId: ${cf:api-v2-iam-auth-SUT-${self:custom.stage}.HttpApiId}
sutApiUrl: ${cf:api-v2-iam-auth-SUT-${self:custom.stage}.HttpApiUrl}
provider:
name: aws
runtime: nodejs16.x
stage: dev
environment:
SUT_API_URL: ${self:custom.sutApiUrl}
deploymentBucket:
name: com.reference-architecture.deploys
serverSideEncryption: AES256
httpApi:
useProviderTags: true
tags:
lumigo:auto-trace: true
plugins:
- serverless-esbuild
- serverless-iam-roles-per-function
- serverless-deployment-bucket
functions:
allowed:
handler: src/testHandler.default
events:
- httpApi:
method: get
path: /allowed
iamRoleStatements:
- Effect: Allow
Action: execute-api:Invoke
Resource: !Sub arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${self:custom.sutApiId}/*/GET/hello
disallowed:
handler: src/testHandler.default
events:
- httpApi:
method: get
path: /disallowed