-
Notifications
You must be signed in to change notification settings - Fork 6
/
sam.yaml
55 lines (51 loc) · 1.42 KB
/
sam.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
54
55
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
LayerArn:
Type: String
FunctionName:
Type: String
Default: defaultFunc
FunctionRole:
Type: String
Transform: AWS::Serverless-2016-10-31
Description: Sample Func for lambda-layer-headless-chromium
Resources:
AWSCliLayer:
Type: AWS::Serverless::Application
Properties:
Location:
ApplicationId: arn:aws:serverlessrepo:us-east-1:903779448426:applications/lambda-layer-awscli
SemanticVersion: 1.0.0
# Parameters:
# # ClusterName: !Ref ClusterName
# FunctionName: !Ref FunctionName
# FunctionRoleArn: !Ref FunctionRoleArn
Func:
Type: AWS::Serverless::Function
Properties:
FunctionName: !Ref FunctionName
Handler: main
CodeUri: ./func.d
Runtime: provided
Layers:
- !GetAtt AWSCliLayer.Outputs.LayerVersionArn
# - arn:aws:lambda:ap-northeast-1:903779448426:layer:awscli-layer:15
- !Ref LayerArn
MemorySize: 512
Environment:
# Variables:
# cluster_name: !Ref ClusterName
Role: !Ref FunctionRole
Timeout: 30
Outputs:
LambdaFuncArn:
Description: Lambda Func ARN
Value: !GetAtt Func.Arn
Export:
Name: !Sub 'LambdaFuncArn-${AWS::StackName}'
LambdaFuncName:
Description: Lambda Func Name
Value: !Ref FunctionName
LambdaRoleArn:
Description: Lambda Role ARN
Value: !Ref FunctionRole