Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
78 lines (77 sloc) 2.52 KB
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Description: Stackery Serverless API Example Stack
Resources:
function61D00F31:
Type: AWS::Serverless::Function
Properties:
FunctionName: !Sub ${AWS::StackName}-function61D00F31
Description: !Sub
- Stackery Stack ${StackeryStackTagName} Environment ${StackeryEnvironmentTagName} Function ${ResourceName}
- ResourceName: getWelcomePage
CodeUri: src/getWelcomePage
Handler: index.handler
Runtime: nodejs8.10
MemorySize: 3008
Timeout: 30
Tracing: Active
Policies:
- AWSXrayWriteOnlyAccess
Events:
apiFE76C470:
Type: Api
Properties:
Path: /
Method: GET
RestApiId: !Ref apiFE76C470
Metadata:
StackeryName: getWelcomePage
apiFE76C470:
Type: AWS::Serverless::Api
Properties:
Name: !Sub
- ${ResourceName} From Stackery Stack ${StackeryStackTagName} Environment ${StackeryEnvironmentTagName}
- ResourceName: apiFE76C470
StageName: !Ref StackeryEnvironmentAPIGatewayStageName
DefinitionBody:
swagger: '2.0'
info: {}
paths:
/:
get:
x-amazon-apigateway-integration:
httpMethod: POST
type: aws_proxy
uri: !Sub arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${function61D00F31.Arn}/invocations
responses: {}
EndpointConfiguration: REGIONAL
function8E6C5467:
Type: AWS::Serverless::Function
Properties:
FunctionName: !Sub ${AWS::StackName}-function8E6C5467
Description: !Sub
- Stackery Stack ${StackeryStackTagName} Environment ${StackeryEnvironmentTagName} Function ${ResourceName}
- ResourceName: logErrors
CodeUri: src/logErrors
Handler: index.handler
Runtime: nodejs8.10
MemorySize: 3008
Timeout: 30
Tracing: Active
Policies:
- AWSXrayWriteOnlyAccess
Metadata:
StackeryName: logErrors
Parameters:
StackeryStackTagName:
Type: String
Description: Stack Name (injected by Stackery at deployment time)
StackeryEnvironmentTagName:
Type: String
Description: Environment Name (injected by Stackery at deployment time)
StackeryEnvironmentAPIGatewayStageName:
Type: String
Description: Environment name used for API Gateway Stage names (injected by Stackery at deployment time)
Metadata:
StackeryErrorsTargets:
function8E6C5467: {}