This repository has been archived by the owner on May 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
87 lines (80 loc) · 2.19 KB
/
serverless.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
76
77
78
79
80
81
82
83
84
85
86
87
service: screenshottr-service
plugins:
- serverless-offline
provider:
name: aws
runtime: nodejs6.10
stage: dev
region: eu-west-1
environment:
SS_STAGE: ${self:provider.stage}
iamRoleStatements:
- Effect: Allow
Action:
- s3:*
Resource: "arn:aws:s3:::screenshottr-service-images-unprocessed-dev*"
- Effect: Allow
Action:
- s3:*
Resource: arn:aws:s3:::screenshottr-service-images-saved-dev/*
- Effect: Allow
Action:
- dynamodb:*
Resource: "arn:aws:dynamodb:eu-west-1:660773155982:table/screenshottr-service-uploads-dev"
- Effect: Allow
Action:
- dynamodb:*
Resource: "arn:aws:dynamodb:eu-west-1:660773155982:table/screenshottr-service-user-dev"
functions:
getSignedS3URL:
handler: src/getSignedS3URL.getSignedS3URL
events:
- http: GET api/getSignedS3URL
memorySize: 128
processUpload:
handler: src/processUpload.processUpload
events:
- s3: screenshottr-service-images-unprocessed-dev
memorySize: 256
getMetadata:
handler: src/getMetadata.getMetadata
events:
- http: GET api/getImageMetadata
memorySize: 128
createUser:
handler: src/createUser.createUser
events:
- http: GET api/user/createUser
memorySize: 128
resources:
Resources:
storageBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: screenshottr-service-images-saved-dev
entriesDynamo:
Type: AWS::DynamoDB::Table
Properties:
TableName: screenshottr-service-uploads-dev
AttributeDefinitions:
- AttributeName: image_id
AttributeType: S
KeySchema:
- AttributeName: image_id
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
usersDynamo:
Type: AWS::DynamoDB::Table
Properties:
TableName: screenshottr-service-user-dev
AttributeDefinitions:
- AttributeName: user_name
AttributeType: S
KeySchema:
- AttributeName: user_name
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5