-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yaml
More file actions
70 lines (65 loc) · 1.66 KB
/
Copy pathtemplate.yaml
File metadata and controls
70 lines (65 loc) · 1.66 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Spring Boot + AWS Lambda demo project
Globals:
Api:
# API Gateway regional endpoints
EndpointConfiguration: REGIONAL
Parameters:
DbUsername:
Type: String
Description: "Database username"
DbPassword:
Type: String
Description: "Database password"
DbUrl:
Type: String
Description: "Database URL"
DbPort:
Type: Number
Description: "Database port"
DbSchema:
Type: String
Description: "Database schema"
RedisUrl:
Type: String
Description: "Redis URL"
RedisPort:
Type: Number
Description: "Redis port"
Resources:
LetMeDoWithDev:
Type: AWS::Serverless::Function
Properties:
Handler: com.LetMeDoWith.LetMeDoWith.common.handler.LambdaStreamHandler::handleRequest
Runtime: java17
CodeUri: .
Architectures:
- x86_64
MemorySize: 2048
Policies: AWSLambdaBasicExecutionRole
Timeout: 600
SnapStart:
ApplyOn: PublishedVersions
AutoPublishAlias: prod
Events:
LetMeDoWithDevApiGw:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
Environment:
Variables:
DB_USERNAME: !Ref DbUsername
DB_PASSWORD: !Ref DbPassword
DB_URL: !Ref DbUrl
DB_PORT: !Ref DbPort
DB_SCHEMA: !Ref DbSchema
REDIS_URL: !Ref RedisUrl
REDIS_PORT: !Ref RedisPort
Outputs:
LetMeDoWithDevApi:
Description: URL for application
Value: !Sub 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com'
Export:
Name: LetMeDoWithDevApi