-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.yaml
34 lines (31 loc) · 1.01 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
klarna-interview-app
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 3
Resources:
FactorialFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: interview_functions/
Handler: factorial.lambda_handler
Runtime: python3.6
Events:
Factorial:
Type: Api
Properties:
Path: /factorial/{number}
Method: get
Outputs:
FactorialApi:
Description: "API Gateway endpoint URL for Prod stage for Hello World function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/factorial/"
FactorialFunction:
Description: "Factorial function ARN"
Value: !GetAtt FactorialFunction.Arn
FactorialFunctionIamRole:
Description: "Implicit IAM Role created for Factorial"
Value: !GetAtt FactorialFunctionRole.Arn