这是我的 lambda cft,我将 jar 文件上传到 s3 存储桶,本节中的 S3Bucket 和 S3Key 是什么? !Sub 在 S3Key 中意味着什么。
ConfigurationLambdaFunction:
Type: AWS::Lambda::Function
Properties:
Description: 'configuration service test'
FunctionName: 'configurationTest'
Handler: lambda.handler.EventHandler::handleRequest
Runtime: Java 11
MemorySize: 128
Timeout: 120
Code:
S3Bucket:
S3Key: !Sub
Role: !GetAtt ConfiguratioLambdaRole.Arn
最佳答案
what is S3Bucket and S3Key in this section?
S3Bucket
- 您放置 jar 的存储桶名称S3Key
- 存储桶中 jar 文件的名称
使用 Sub在你的例子中没有意义。但是,如果您想根据模板的输入参数等参数化您的 S3Key
,则可以使用。
关于amazon-web-services - 使用 CloudFormation 部署 Lambda 函数时,函数中的 S3Bucket 和 S3Key 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68169865/