-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
31 lines (31 loc) · 842 Bytes
/
template.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
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: A service that posts images with caption on a Mastodon instance.
Resources:
api:
Type: AWS::Serverless::Api
Properties:
StageName: api
TracingEnabled: true
OpenApiVersion: 3.0.2
function:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs18.x
CodeUri: function/.
Description: Post to Mastodon instance
Timeout: 10
# Function's execution role
Policies:
- AWSLambdaBasicExecutionRole
- AWSLambda_ReadOnlyAccess
- AWSXrayWriteOnlyAccess
Tracing: Active
Events:
getEndpoint:
Type: Api
Properties:
RestApiId: !Ref api
Path: /post
Method: POST