forked from jideshv/deeplens-hack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeeplens-hack.yml
75 lines (75 loc) · 2.06 KB
/
deeplens-hack.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: Outputs the JPEG bits to a FIFO file on AWS DeepLens
Resources:
deeplensFaceDetection:
Type: 'AWS::Serverless::Function'
Properties:
Handler: greengrass_face_detection.function_handler
Runtime: python2.7
CodeUri: .
Description: Outputs the JPEG bits to a FIFO file on AWS DeepLens
MemorySize: 1536
Timeout: 3
Role:
!Join
- ''
- - 'arn:aws:iam::'
- !Ref 'AWS::AccountId'
- ':role/AWSDeepLensLambdaRole'
rekognizeEmotions:
Type: 'AWS::Serverless::Function'
Properties:
Handler: lambda_function.lambda_handler
Runtime: python2.7
CodeUri: .
Description: An Amazon S3 trigger that uses rekognition APIs to detect faces
MemorySize: 128
Timeout: 3
Role:
!Join
- ''
- - 'arn:aws:iam::'
- !Ref 'AWS::AccountId'
- ':role/service-role/rekognize-faces-role'
Events:
BucketEvent1:
Type: S3
Properties:
Bucket:
Ref: DeeplensHackBucket
Events:
- 's3:ObjectCreated:*'
Filter:
S3Key:
Rules:
- Name: prefix
Value: faces/
- Name: suffix
Value: jpg
Tags:
'lambda-console:blueprint': rekognition-python
DeeplensHackBucket:
Type: 'AWS::S3::Bucket'
Properties:
AccessControl: 'BucketOwnerFullControl'
BucketName:
!Join
- ''
- - 'deeplens-hack-'
- !Ref 'AWS::AccountId'
RekognizeFacesDDB:
Type: "AWS::DynamoDB::Table"
Properties:
AttributeDefinitions:
-
AttributeName: "s3key"
AttributeType: "S"
KeySchema:
-
AttributeName: "s3key"
KeyType: "HASH"
ProvisionedThroughput:
ReadCapacityUnits: "5"
WriteCapacityUnits: "5"
TableName: "recognize-faces"