-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathsam.jvm.yaml
64 lines (60 loc) · 1.84 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: AWS Serverless Quarkus HTTP - com.amazon::LambdaQuarkus
Resources:
ApiGatewayApi:
Type: AWS::Serverless::Api
Properties:
Name: Api Gateway for Quarkus demo
StageName: prod
LambdaQuarkusFunction:
Type: AWS::Serverless::Function
Properties:
Handler: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler::handleRequest
Runtime: java11
CodeUri: target/function.zip
MemorySize: 512
Timeout: 30
Policies:
- DynamoDBCrudPolicy:
TableName: Users
Events:
LambdaQuarkusGetAll:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApi
Path: /users
Method: GET
LambdaQuarkusGetUser:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApi
Path: /users/{userId}
Method: GET
LambdaQuarkusDeleteUser:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApi
Path: /users/{userId}
Method: DELETE
LambdaQuarkusAddUser:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApi
Path: /users
Method: POST
UsersTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: Users
BillingMode: PAY_PER_REQUEST
AttributeDefinitions:
- AttributeName: userId
AttributeType: S
KeySchema:
- AttributeName: userId
KeyType: HASH
Outputs:
ApiUrl:
Description: URL of the users listing in the prod stage
Value: !Sub "https://${ApiGatewayApi}.execute-api.${AWS::Region}.amazonaws.com/prod/users"