-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
44 lines (42 loc) · 1.28 KB
/
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
AWSTemplateFormatVersion: 2010-09-09
Transform: 'AWS::Serverless-2016-10-31'
Description: Lambda for ephemeral-journal project. Handles read and write operations.
Resources:
EphemeralJournalApi:
Type: 'AWS::Serverless::Api'
Properties:
Name: Ephemeral Journal API Gateway
StageName: Staging
Cors: "'*'"
Auth:
DefaultAuthorizer: AWS_IAM
EphemeralJournalLambda:
Type: 'AWS::Serverless::Function'
Properties:
FunctionName: 'ephemeral-journal-lambda'
Handler: index.readFile
Runtime: nodejs14.x
CodeUri: .
Description: Lambda for ephemeral-journal project. Handles read and write operations.
MemorySize: 128
Timeout: 3
Role: 'arn:aws:iam::458900578489:role/ephemeral-journal-lambda-role'
Events:
ReadFilePost:
Type: Api
Properties:
Path: '/entry/{entryId}'
Method: get
RestApiId:
Ref: EphemeralJournalApi
DependsOn:
- EphemeralJournalBkt
EphemeralJournalBkt:
Type: 'AWS::S3::Bucket'
Properties:
BucketName: 'ephemeral-journal-bkt'
PublicAccessBlockConfiguration:
BlockPublicAcls: True
BlockPublicPolicy: True
IgnorePublicAcls: True
RestrictPublicBuckets: True