【问题标题】:Missing required parameter for publish-layer-version (aws cli)缺少发布层版本所需的参数(aws cli)
【发布时间】:2021-11-19 06:37:14
【问题描述】:

我正在尝试使用 AWS CLI 发布层

aws lambda publish-layer-version --layer-name layer --region us-west-2

这是错误信息 -

Parameter validation failed:
Missing required parameter in input: "Content"

Documentation 显示此示例 -

aws lambda publish-layer-version \
    --layer-name my-layer \
    --description "My Python layer" \
    --license-info "MIT" \
    --content S3Bucket=lambda-layers-us-west-2-123456789012,S3Key=layer.zip \
    --compatible-runtimes python3.6 python3.7

如果我不使用 S3,我应该为内容参数添加什么值?

【问题讨论】:

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


    【解决方案1】:

    您可以使用--zip-file,而不是--content

    您要上传的内容的 zip 文件的路径。指定 --zip-file 或 --content,但不能同时指定。示例:fileb://content.zip

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-27
      • 2021-09-02
      • 1970-01-01
      • 1970-01-01
      • 2016-12-05
      • 2021-09-19
      相关资源
      最近更新 更多