-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate-java17-graalvm-runtime.yaml
44 lines (40 loc) · 1.07 KB
/
template-java17-graalvm-runtime.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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
ItemTable:
Type: AWS::Serverless::SimpleTable
Properties:
PrimaryKey:
Name: id
Type: String
SSESpecification:
SSEEnabled: true
Java17GraalvmRuntimeLayer:
Type: AWS::Serverless::LayerVersion
Properties:
ContentUri: graalvm-layer.zip
DynamoDbWriteHandler:
Type: AWS::Serverless::Function
Properties:
Runtime: provided.al2
Handler: com.home.amazon.serverless.DynamoDbWriteHandler::handleRequest
Timeout: 60
MemorySize: 512
CodeUri: lambda-app-graalvm.zip
Environment:
Variables:
TABLE: !Ref ItemTable
Policies:
- DynamoDBWritePolicy:
TableName: !Ref ItemTable
Layers:
- !Ref Java17GraalvmRuntimeLayer
Events:
ApiEvent:
Type: Api
Properties:
Path: /items/
Method: post
Outputs:
ApiEndpoint:
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod"