-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathtemplate.yaml
50 lines (44 loc) · 1.25 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
45
46
47
48
49
50
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
powertools-examples-cloudformation
Sample SAM Template for powertools-examples-cloudformation
Globals:
Function:
Timeout: 20
Parameters:
BucketNameParam:
Type: String
Resources:
HelloWorldCustomResource:
Type: AWS::CloudFormation::CustomResource
Properties:
ServiceToken: !GetAtt HelloWorldFunction.Arn
BucketName: !Ref BucketNameParam
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: ../../
Handler: helloworld.App::handleRequest
Runtime: java11
Architectures:
- x86_64
MemorySize: 512
Policies:
- Statement:
- Sid: bucketaccess1
Effect: Allow
Action:
- s3:GetLifecycleConfiguration
- s3:PutLifecycleConfiguration
- s3:CreateBucket
- s3:ListBucket
- s3:DeleteBucket
Resource: '*'
Environment:
Variables:
JAVA_TOOL_OPTIONS: -XX:+TieredCompilation -XX:TieredStopAtLevel=1
Outputs:
HelloWorldFunction:
Description: "Hello World Lambda Function ARN"
Value: !GetAtt HelloWorldFunction.Arn