-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
38 lines (36 loc) · 1.18 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
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: >
test
Sample SAM Template for test
Parameters:
StageName:
Type: String
Default: "prod"
ApiName:
Type: String
Default: "api-server"
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Resources:
LambdaFunctions:
Type: AWS::Serverless::Application
Properties:
# Location: server/nested_templates/lambdafunctions.yaml
ApiGateway:
Type: AWS::Serverless::Application
DependsOn: LambdaFunctions
Properties:
# Location: server/nested_templates/apigateway.yaml
Parameters:
StageName: !Ref StageName
ApiName: !Ref ApiName
HelloWorldFunctionArn: !GetAtt LambdaFunctions.Outputs.HelloWorldFunctionArn
APIGatewayLambdaPermissions:
Type: AWS::Serverless::Application
DependsOn:
- ApiGateway
Properties:
# Location: server/nested_templates/api_gateway_permissions.yaml
Parameters:
ServerlessApiGatewayApi: !GetAtt ApiGateway.Outputs.ServerlessApiGatewayApi
HelloWorldFunctionArn: !GetAtt LambdaFunctions.Outputs.HelloWorldFunctionArn