Serverless-next.js: defaultLambda name is not being set

Created on 2 Mar 2020  路  14Comments  路  Source: serverless-nextjs/serverless-next.js

Describe the bug
Despite configuring the defaultLamda field, the name is always auto-generated.

To Reproduce
Set the defaultLambda field in your serverless.yml to something. Then view your lambda function in AWS.

myProject:
    component: serverless-next.js
    inputs:
        bucketName: ${env.bucketName}
        name:
            defaultLambda: ${env.name}

Expected behavior
My lamda function should be named according to env.name. env.bucketName works as expected, so I know my .env files are set up correctly.

I've tried hardcoding it as well to be sure.

Screenshots
As you can see here, the lambda function name is still being autogenerated:
image

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.3 LTS

Most helpful comment

All 14 comments

I've also found this bug

Same here

This needs to be fixed in the lambda component - https://github.com/serverless-components/aws-lambda/pull/16. Nothing I can do until that PR is merged.

This needs to be fixed in the lambda component - serverless-components/aws-lambda#16. Nothing I can do until that PR is merged.

Thank you for replying. I'm concerned that lambda component repo hasn't been updated in 6 months despite 10 open pull requests with some pretty simple fixes. It seems to be threatening the viability of this repo.

This needs to be fixed in the lambda component - serverless-components/aws-lambda#16. Nothing I can do until that PR is merged.

Thank you for replying. I'm concerned that lambda component repo hasn't been updated in 6 months despite 10 open pull requests with some pretty simple fixes. It seems to be threatening the viability of this repo.

Yeap, sadly it's still unmerged. Another repo endangering this project 馃槩

The only way I got something merged was by emailing the founder of the project, who then put pressure on one of the maintainers to merge. Not only was my merge vital, but other merges were allowed to happen in a haphazard manner before they stopped caring. I am actually shocked about the lack of support that these components have been given. It's sad because it is a good idea. Would love someone other than Serverless to take it up.

Any thoughts on what steps we need to take to take advantage of this? I just pulled down 1.11.3 of serverless-next.js and attempted a deploy and still not seeing it use this name property.

My serverless.yml

...
  inputs:
    name:
      defaultLambda: myWebClient

Same here, I can't see the custom name yet.

any update on this? I am also getting same problem when running command
npx serverless

@danielcondemarin apparently a newer version of @serverless/aws-lambda has been released requiring 'significant' configuration changes according to this comment: https://github.com/serverless-components/aws-lambda/issues/11#issuecomment-613449792

Although it may be just me but it still seems to be using and older version when pulled from npm, are we missing some kind of resolution here or do we need to manually update somewhere?

@danielcondemarin apparently a newer version of @serverless/aws-lambda has been released requiring 'significant' configuration changes according to this comment: serverless-components/aws-lambda#11 (comment)

Although it may be just me but it still seems to be using and older version when pulled from npm, are we missing some kind of resolution here or do we need to manually update somewhere?

@Podders There is a newer version of aws-lambda but is not compatible with this project (or any other V1 serverless-component). I am currently working on upgrading, once that's done the new aws-lambda component can be used. Also the new components won't be published to NPM. The new version of serverless components has its own registry.
See https://github.com/danielcondemarin/serverless-next.js/issues/380 for updates on this.

@danielcondemarin That'll teach me for not paying attention, time for some reading!

And thanks :)

@danielcondemarin since v1 of @serverless/aws-lambda is not being supported anymore, can we switch to use a fork that incorporates the lambda name fix: https://github.com/serverless-components/aws-lambda/pull/16/files
That would help to close out this issue until #380 is done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dhmacs picture dhmacs  路  31Comments

Meemaw picture Meemaw  路  23Comments

asterikx picture asterikx  路  42Comments

arelaxend picture arelaxend  路  15Comments

mdw2000 picture mdw2000  路  18Comments