-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
37 lines (33 loc) · 920 Bytes
/
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
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Description: Blog Posts Lambda API
Globals:
Function:
Runtime: java17
MemorySize: 2048
Timeout: 29
Resources:
BlogPostsAPI:
Type: AWS::Serverless::Api
Properties:
StageName: prod
BlogPostsFunction:
Type: AWS::Serverless::Function
Properties:
Handler: dev.kwatatshey.serverlessapi.StreamLambdaHandler
CodeUri: target/serverless-api-0.0.1-SNAPSHOT-lambda-package.zip
AutoPublishAlias: live
SnapStart:
ApplyOn: PublishedVersions
Events:
ApiEvents:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
RestApiId: !Ref BlogPostsAPI
Outputs:
BlogPostsEndpoint:
Description: API Gateway Blog Posts Endpoint
Value:
Fn::Sub: https://${BlogPostsAPI}.execute-api.${AWS::Region}.amazonaws.com/prod/