awslabs / aws-api-gateway-developer-portal

A Serverless Developer Portal for easily publishing and cataloging APIs
Apache License 2.0
924 stars 399 forks source link

InvalidParameterValueException Layer conversion failed: Some files do not have read permissions #451

Open dayyehm opened 3 years ago

dayyehm commented 3 years ago

When using sam package , sam deploy failing with the error :

"Layer conversion failed: Some files do not have read permissions (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException)"

The issue here report similar problem : https://github.com/aws/aws-sam-cli/issues/2344

CoshUS commented 3 years ago

@dayyehm Does this happen during creating a new resource or updating an existing resource?

dayyehm commented 3 years ago

during the creation of new resource

| AWS::IAM::Role | LambdaEdgeFunctionRole | CREATE_FAILED | Resource creation cancelled | | AWS::Lambda::LayerVersion | LambdaCommonLayer8b9099a443 | CREATE_FAILED | Layer conversion failed: Some files do not have read permissions; (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; )

CoshUS commented 3 years ago

What is your SAM CLI version?

CoshUS commented 3 years ago

With SAM CLI 1.9.0 I was able to deploy aws-api-gateway-developer-portal.

...

CREATE_IN_PROGRESS            AWS::Lambda::LayerVersion     LambdaCommonLayer36d66d0922   Resource creation Initiated
CREATE_COMPLETE               AWS::Lambda::LayerVersion     LambdaCommonLayer36d66d0922   -

...

CREATE_COMPLETE               AWS::CloudFormation::Stack    dev-portal                    -
---------------------------------------------------------------------------------------------------------------------

CloudFormation outputs from deployed stack
---------------------------------------------------------------------------------------------------------------------
Outputs
---------------------------------------------------------------------------------------------------------------------
Key                 WebsiteURL
Description         CloudFront URL for website
Value               https://******.cloudfront.net
---------------------------------------------------------------------------------------------------------------------

Successfully created/updated stack - dev-portal in us-east-1
idwise-team commented 3 years ago

I can't even do it from Lambda console now, CLI (v1.10) doesn't complain but doesn't add the layer!!

I get the same error: image

CoshUS commented 3 years ago

@ideal-management Can you try deleting the existing layer and redeploy it using the latest version of SAM CLI?