-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathtemplate.yml
More file actions
45 lines (45 loc) · 1.22 KB
/
Copy pathtemplate.yml
File metadata and controls
45 lines (45 loc) · 1.22 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
42
43
44
45
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Lambda application that calls the Lambda API.
Resources:
bucket:
Type: AWS::S3::Bucket
DeletionPolicy: Retain
function:
Type: AWS::Serverless::Function
Properties:
CodeUri: build/distributions/s3-java.zip
Handler: example.Handler
Runtime: java21
Description: Java function
MemorySize: 512
Timeout: 30
# Function's execution role
Policies:
- AWSLambdaBasicExecutionRole
- AWSLambda_ReadOnlyAccess
- AWSXrayWriteOnlyAccess
- AWSLambdaVPCAccessExecutionRole
- AmazonS3FullAccess
Tracing: Active
Layers:
- !Ref libs
Events:
s3Notification:
Type: S3
Properties:
Bucket: !Ref bucket
Events: s3:ObjectCreated:*
Filter:
S3Key:
Rules:
- Name: prefix
Value: inbound/
libs:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: s3-java-lib
Description: Dependencies for the Java S3 sample app.
ContentUri: build/s3-java-lib.zip
CompatibleRuntimes:
- java21