This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
sam-template.yaml
69 lines (69 loc) · 2.37 KB
/
sam-template.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
67
68
69
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
ImageProcessorFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: ./ImageProcessor/bin/Debug/netcoreapp2.1/publish/
Handler: ImageProcessor::ImageProcessor.Function::FunctionHandler
Runtime: dotnetcore2.1
Timeout: 100
Policies:
- AWSLambdaExecute # Managed Policy
- Version: '2012-10-17' # Policy Document
Statement:
- Effect: Allow
Action:
- cloudwatch:*
- ssm:*
- rekognition:*
- sagemaker:*
- s3:*
Resource: '*'
SessionProcessorFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: ./SessionProcessor/bin/Debug/netcoreapp2.1/publish/
Handler: SessionProcessor::SessionProcessor.Function::FunctionHandler
Runtime: dotnetcore2.1
Timeout: 100
Policies:
- AWSLambdaExecute # Managed Policy
- Version: '2012-10-17' # Policy Document
Statement:
- Effect: Allow
Action:
- cloudwatch:*
- ssm:*
- dynamodb:*
Resource: '*'
Events:
ProcessSessions:
Type: Schedule
Properties:
Schedule: rate(1 minute)
DeepLensMotionDetection:
Type: 'AWS::Serverless::Function'
Properties:
CodeUri: ./DetectMovement/
Handler: lambda.function_handler
MemorySize: 1536
Runtime: python2.7
Timeout: 30
TrackedSessionsTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeType: S
AttributeName: SessionId
#- AttributeType: S
# AttributeName: Started
#- AttributeType: S
# AttributeName: Ended
#- AttributeType: S
# AttributeName: Items
BillingMode: PAY_PER_REQUEST
KeySchema:
- AttributeName: SessionId
KeyType: HASH
TableName: TrackedSessions