-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtemplate.yaml
More file actions
40 lines (40 loc) · 1.43 KB
/
template.yaml
File metadata and controls
40 lines (40 loc) · 1.43 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
# See https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html
# for more info to see how to tune the lambda function configs based on your use case.
FirstFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: FirstFunction
Runtime: java8
Handler: com.pattermatch.aws.lambda.java.FirstFunction::handleRequest
Timeout: 60
MemorySize: 512
CodeUri: ./target/asyncinvoke.jar
# Attach policies here to give the function permission to access other AWS resources if needed
# See: https://github.com/awslabs/serverless-application-model/blob/master/docs/policy_templates.rst
# eg:
Policies:
- LambdaInvokePolicy:
FunctionName:
!Ref SecondFunction
SecondFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: SecondFunction
Runtime: java8
Handler: com.pattermatch.aws.lambda.java.SecondFunction::handleRequest
Timeout: 60
MemorySize: 512
CodeUri: ./target/asyncinvoke.jar
DeadLetterQueue:
Type: SNS
TargetArn: !Ref AsyncInvokeErrorsTopic
AsyncInvokeErrorsTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: "AsyncInvokeErrorsTopic"
Subscription:
- Endpoint: your.email@email.com
Protocol: "email"