Home > Net >  Missing required parameter for publish-layer-version (aws cli)
Missing required parameter for publish-layer-version (aws cli)

Time:11-20

I'm trying to publish the layer using AWS CLI

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

This is the error message -

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

Documentation shows this example -

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

How can I find value for the content param?

What should I use if I don't use S3 to store a layer?

CodePudding user response:

You can use --zip-file, instead of --content:

The path to the zip file of the content you are uploading. Specify --zip-file or --content, but not both. Example: fileb://content.zip

  • Related