amazon-web-services - 使用 CloudFormation 部署 Lambda 函数时,函数中的 S3Bucket 和 S3Key 是什么

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

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

enter image description here

最佳答案

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/

相关文章:

javascript - 使用 CI 和 CodeDeploy 持续部署 Node.js 应用程序

java - S3 Java 客户端多次失败,出现 "Premature end of Content-Length delimited message body"或 "java.net.SocketException Socket closed"

amazon-web-services - 是否可以从 AWS S3 批量下载?

amazon-web-services - 创建 lambda 时如何获取 cloudformation 创建的角色

amazon-web-services - AWS ECS通过Cloudformation创建计划任务(cron)

python - 如何/在哪里定义/传递cloudformation参数?

amazon-web-services - 限制联合 IAM 用户在对象级别访问 Amazon S3

aws-lambda - AWS Cognito 与 Lambda 进行自定义验证

amazon-web-services - 从 lambda 创建了 cloudwatch 事件,但 Cloudwatch 事件中没有任何内容

amazon-s3 - Cloudformation - S3 AWS 事件没有被触发?