-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate-sam.yaml
More file actions
41 lines (37 loc) · 1.2 KB
/
template-sam.yaml
File metadata and controls
41 lines (37 loc) · 1.2 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Runtime: python3.7
Timeout: 60
Environment:
Variables:
# Set localtest env
# Set environment variable so amazon service can be switched in local settings
# This has to be matched with localstack config in docker-compose.yaml
# Current example contains DynamoDB and S3
TEST_ENV: LOCAL
Resources:
RequestAnnotation:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
CodeUri: .
Handler: annotation_requestor.insert_annotation
HandleS3Event:
Type: AWS::Serverless::Function
Properties:
CodeUri: .
Handler: s3_event_handler.trigger_annotation
AnnotaionDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: ANNOTATION_TABLE
PrimaryKey:
Name: job_id
Type: String
AttributeDefinitions:
AttributeName: job_id
AttributeType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5