-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtemplate.yml
More file actions
41 lines (38 loc) · 1.23 KB
/
template.yml
File metadata and controls
41 lines (38 loc) · 1.23 KB
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Lambda with spring boot.
Resources:
PsipherFunction:
Type: AWS::Serverless::Function
Properties:
Handler: com.psipher.application.LambdaHandler::handleRequest
Runtime: java8
CodeUri: target/psipher-0.0.1-SNAPSHOT.jar
MemorySize: 1512
Policies: [AWSLambdaBasicExecutionRole, AWSLambdaDynamoDBExecutionRole, AmazonDynamoDBFullAccess, AWSKeyManagementServicePowerUser]
Timeout: 60
Events:
GetResource:
Type: Api
Properties:
Path: /{proxy+}
Method: any
PsipherDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
AttributeDefinitions:
- AttributeName: "userId"
AttributeType: "S"
KeySchema:
- AttributeName: "userId"
KeyType: "HASH"
ProvisionedThroughput:
ReadCapacityUnits: "1"
WriteCapacityUnits: "1"
TableName: "UserDetails"
Outputs:
SpringBootPsipherApi:
Description: URL for application /ping can be replaced by the url mapped
Value: !Sub 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Stage/ping'
Export:
Name: SpringBootPsipherApi