serverless-scaleway-functions icon indicating copy to clipboard operation
serverless-scaleway-functions copied to clipboard

While deploying: An error occured while getting a presigned URL to upload functions's archived code.

Open dimitrilahaye opened this issue 3 years ago • 3 comments

Hello, I have this error during the deployment of my function:

An error occured while getting a presigned URL to upload functions's archived code.

Below are my environment information:

     Operating System:          linux
     Node Version:              14.17.6
     Framework Version:         2.72.3 (local)
     Plugin Version:            5.5.4
     SDK Version:               4.3.2
     Components Version:        3.18.2

And below my serverless.yaml

service: my-app
configValidationMode: off
variablesResolutionMode: 20210326
scwRegion: fr-par
provider:
    name: scaleway
    runtime: node14 # Available node runtimes are listed in documentation
    # Global Environment variables - used in every functions
    env:
        test: test
    # the path to the credentials file needs to be absolute
    scwToken: ${env:SCWTOKEN}
    scwProject: ${env:SCWPROJECT}

plugins:
    - serverless-scaleway-functions

package:
    patterns:
        - "!.gitignore"
        - "!.git/**"
        - './node_modules/**'

functions:
    myfunction:
        handler: dist/src/consumers/handlers/myfunctionhandler.handle

Do you have an idea of what is happening?

dimitrilahaye avatar Jun 18 '22 20:06 dimitrilahaye

First clue found

Actualy, the size of the zip generated during deploy process is 133 Mb. By adding a console.error into the source file I can see this error:

Function source code is too large, it should be less than 8.388608e+08 MB

When I read the limitations from Scaleway, I can read the limit is 100 Mb.

I have to write a support ticket to increase it.

Maybe a better log in this plugin could be great?

dimitrilahaye avatar Jun 19 '22 12:06 dimitrilahaye

+1 to improving the verbosity here. I found the exact same error message and can confirm that my generated .zip is too large as well:

> du -sh .serverless/*
219M	.serverless/serverless-scaleway-test.zip

astrojuanlu avatar Dec 05 '22 22:12 astrojuanlu