-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
44 lines (40 loc) · 1.88 KB
/
template.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
Description: >
DDB-CAR
Lambda Function for DynamoDB Cross Account Replication
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 20
MemorySize: 128
Resources:
LambdaFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Properties:
Role: arn:aws:iam::401135408972:role/DDB-CAR-Source-Role
CodeUri: LambdaFunction
Handler: ddbcar.App::handleRequest
Runtime: java8
MemorySize: 512
Environment: # More info about Env Vars: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#environment-object
Variables:
PARAM1: VALUE
JAVA_TOOL_OPTIONS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1 # More info about tiered compilation https://aws.amazon.com/blogs/compute/optimizing-aws-lambda-function-performance-for-java/
Events:
Stream:
Type: DynamoDB
Properties:
Stream: arn:aws:dynamodb:ap-south-1:401135408972:table/Source-DDB/stream/2024-02-10T19:42:39.913
BatchSize: 1
StartingPosition: TRIM_HORIZON
Outputs:
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
# Find out more about other implicit resources you can reference within SAM
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api
LambdaFunction:
Description: "DDB-CAR Lambda Function ARN"
Value: !GetAtt LambdaFunction.Arn
LambdaFunctionIamRole:
Description: "Implicit IAM Role created for DDB-CAR function"
Value: !GetAtt LambdaFunction.Arn