-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate-java11-runtime.yaml
More file actions
37 lines (34 loc) · 924 Bytes
/
template-java11-runtime.yaml
File metadata and controls
37 lines (34 loc) · 924 Bytes
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
Resources:
ItemTable:
Type: AWS::Serverless::SimpleTable
Properties:
PrimaryKey:
Name: id
Type: String
SSESpecification:
SSEEnabled: true
DynamoDbWriteHandler:
Type: AWS::Serverless::Function
Properties:
Runtime: java11
Handler: com.home.amazon.serverless.DynamoDbWriteHandler::handleRequest
Timeout: 60
MemorySize: 512
CodeUri: lambda-app/target/lambda-app.jar
Environment:
Variables:
TABLE: !Ref ItemTable
Policies:
- DynamoDBWritePolicy:
TableName: !Ref ItemTable
Events:
ApiEvent:
Type: Api
Properties:
Path: /items/
Method: post
Outputs:
ApiEndpoint:
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod"