-
Notifications
You must be signed in to change notification settings - Fork 0
/
sam.jvm.yaml
48 lines (44 loc) · 1.47 KB
/
sam.jvm.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
39
40
41
42
43
44
45
46
47
48
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: AWS Serverless Quarkus HTTP - ECCShopDB
Globals:
Api:
EndpointConfiguration: REGIONAL
BinaryMediaTypes:
- "*/*"
Parameters:
Environment:
Type: String
AllowedValues:
- dev
- prod
Resources:
ECCShopDB:
Type: AWS::Serverless::Function
Properties:
FunctionName: !Sub eccshopdb-${Environment}-api
Handler: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler::handleRequest
Runtime: java11
CodeUri: target/function.zip
MemorySize: 512
Policies: AWSLambdaBasicExecutionRole
Timeout: 30
Environment:
Variables:
SHOPDB_API_USERNAME: !Sub "{{resolve:ssm:eccshopdb-api-username-${Environment}}}"
QUARKUS_DATASOURCE_USERNAME: !Sub "{{resolve:ssm:eccshopdb-postgresql-username-${Environment}}}"
QUARKUS_DATASOURCE_PASSWORD: !Sub "{{resolve:ssm:eccshopdb-postgresql-password-${Environment}}}"
QUARKUS_DATASOURCE_JDBC_URL: !Sub "{{resolve:ssm:eccshopdb-postgresql-jdbc-url-${Environment}}}"
QUARKUS_TRANSACTION_MANAGER_DEFAULT_TRANSACTION_TIMEOUT: 1800
Events:
GetResource:
Type: Api
Properties:
Path: /{proxy+}
Method: any
Outputs:
ECCShopDBAPI:
Description: ECCShopDB API URL
Value: !Sub 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/'
Export:
Name: ECCShopDBAPI