【发布时间】:2021-10-09 19:50:49
【问题描述】:
我通过 CloudFormation 向我的 Lambda 函数添加了一层。现在我需要在我的函数中再添加一层。基本上,我现有的 Lambda 函数需要两层。可能吗?我尝试搜索 AWS 文档,但没有看到。
Resources:
LambdaLayer:
Type: "AWS::Lambda::LayerVersion"
Properties:
CompatibleRuntimes:
- python3.8
Content:
S3Bucket: !Sub "hello-${AWS::Region}"
S3Key: !Sub "myapp/layer1.zip"
LayerName: "layer1"
LambdaFunction:
Type: "AWS::Lambda::Function"
Properties:
Code:
S3Bucket: hello
S3Key: myapp/function.zip"
FunctionName: "hello-function"
Handler: "hello-function.lambda_handler"
Layers:
- !Ref LambdaLayer
【问题讨论】:
标签: amazon-web-services aws-lambda amazon-cloudformation