【问题标题】:what is S3Bucket and S3Key in function when deploy Lambda Functions with CloudFormation使用 CloudFormation 部署 Lambda 函数时,函数中的 S3Bucket 和 S3Key 是什么
【发布时间】:2021-09-11 03:25:19
【问题描述】:

这是我的 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

【问题讨论】:

    标签: amazon-web-services aws-lambda amazon-cloudformation


    【解决方案1】:

    本节中的 S3Bucket 和 S3Key 是什么?

    • S3Bucket - 您放置 jar 的存储桶名称
    • S3Key - 桶中 jar 文件的名称

    在您的示例中使用 Sub 没有意义。但是,如果您想根据模板的输入参数等对 S3Key 进行参数化,则可以使用。

    【讨论】:

      猜你喜欢
      • 2020-03-05
      • 1970-01-01
      • 2018-10-31
      • 2021-11-03
      • 2021-09-16
      • 1970-01-01
      • 1970-01-01
      • 2021-02-12
      • 2017-10-14
      相关资源
      最近更新 更多