forked from bradens/slacking-apes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
47 lines (43 loc) · 1.42 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
ape-checker
###
# Note that we should be using yaml anchors for the policies, instead of repeating ourselves.
# however aws-sam doesn't support anchors yet. https://github.com/aws/serverless-application-model/issues/228
# Refactor when that is closed.
###
Globals:
Api:
Cors:
AllowCredentials: False
AllowMethods: "'GET'"
AllowOrigin: "'*'"
Function:
MemorySize: 512
Timeout: 100
Runtime: nodejs14.x
# Resources declares the AWS resources that you want to include in the stack
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
Resources:
# Each Lambda function is defined by properties:
# https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
# This is a Lambda function config associated with the source code: in src/handlers/example.ts
Ape:
Type: AWS::Serverless::Function
Metadata:
BuildMethod: makefile
Properties:
PackageType: Zip
CodeUri: ./dist/handlers/ape/
Handler: ape.handler
Events:
Api:
Type: Api
Properties:
Path: /ape
Method: GET
Outputs:
WebEndpoint:
Description: "API Gateway endpoint URL"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/"