-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.yml
51 lines (51 loc) · 1.35 KB
/
template.yml
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
---
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: AWS Serverless Spring Boot 2 API - com.circle::api
Globals:
Api:
EndpointConfiguration: REGIONAL
Resources:
ApiFunction:
Type: AWS::Serverless::Function
Properties:
Handler: com.circle.api.StreamLambdaHandler::handleRequest
Runtime: java17
CodeUri: .
MemorySize: 1512
Policies:
- AWSLambdaDynamoDBExecutionRole
- DynamoDBCrudPolicy:
TableName: !Ref UserDynamoDBTable
Timeout: 60
SnapStart:
ApplyOn: PublishedVersions
Events:
ProxyResource:
Type: Api
Properties:
Path: /{proxy+}
Method: any
UserDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: "PK"
AttributeType: "S"
- AttributeName: "SK"
AttributeType: "S"
KeySchema:
- AttributeName: "PK"
KeyType: "HASH"
- AttributeName: "SK"
KeyType: "RANGE"
ProvisionedThroughput:
ReadCapacityUnits: "1"
WriteCapacityUnits: "1"
TableName: "User"
Outputs:
CircleApi:
Description: URL for application
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/"
Export:
Name: CircleApi