forked from aws-samples/amazon-redshift-udfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lambda.yaml
53 lines (53 loc) · 1.53 KB
/
lambda.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
45
46
47
48
49
50
51
52
53
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
S3Bucket:
Description: Bucket containing the java packages
Type: String
S3Key:
Description: Key containing the java packages
Type: String
Resources:
LambdaRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
-
Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action:
- sts:AssumeRole
Path: /
Policies:
-
PolicyName: CloudwatchLogs
PolicyDocument:
Version: 2012-10-17
Statement:
-
Effect: Allow
Action:
- logs:CreateLogGroup
Resource:
- !Sub "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:*"
-
Effect: Allow
Action:
- logs:CreateLogStream
- logs:PutLogEvents
Resource:
- !Sub "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*"
LambdaUDFFunction:
Type: "AWS::Lambda::Function"
Properties:
FunctionName: f-upper-java-varchar
Role: !GetAtt 'LambdaRole.Arn'
Timeout: 100
Code:
S3Bucket: !Ref S3Bucket
S3Key: !Ref S3Key
Handler: f_upper_java_varchar.Handler::handleRequest
Runtime: java11