This repository was archived by the owner on Mar 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yaml
66 lines (62 loc) · 1.65 KB
/
serverless.yaml
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
63
64
65
66
service: tcx-aws-devops-dlp
plugins:
- serverless-plugin-typescript
- serverless-offline
provider:
name: aws
region: ${env:AWS_REGION,opt:region,'us-west-1'}
runtime: nodejs12.x
environment:
PRESIDIO_ENDPOINT: ${opt:presidio-endpoint,env:PRESIDIO_ENDPOINT}
iam:
role:
statements:
- Effect: 'Allow'
Resource:
- 'Fn::GetAtt':
- 'AdoWorkItemsDlpStatus'
- 'Arn'
Action:
- 'dynamodb:BatchGet*'
- 'dynamodb:DescribeStream'
- 'dynamodb:DescribeTable'
- 'dynamodb:Get*'
- 'dynamodb:Query'
- 'dynamodb:Scan'
- 'dynamodb:BatchWrite*'
- 'dynamodb:CreateTable'
- 'dynamodb:Delete*'
- 'dynamodb:Update*'
- 'dynamodb:PutItem'
functions:
dlp:
handler: DLPTrigger/lambda.handle
events:
- http:
path: api/dlptrigger
method: GET
- http:
path: api/dlptrigger
method: POST
- http:
path: api/dlptrigger
method: OPTIONS
resources:
Resources:
AdoWorkItemsDlpStatus:
Type: 'AWS::DynamoDB::Table'
Properties:
TableName: 'AdoWorkItemsDlpStatus'
AttributeDefinitions:
- AttributeName: 'projectId'
AttributeType: 'S'
- AttributeName: 'resourceId'
AttributeType: 'S'
KeySchema:
- AttributeName: 'projectId'
KeyType: 'HASH'
- AttributeName: 'resourceId'
KeyType: 'RANGE'
ProvisionedThroughput:
ReadCapacityUnits: '1'
WriteCapacityUnits: '1'