GithubHelp home page GithubHelp logo

Comments (4)

Mmarzex avatar Mmarzex commented on June 22, 2024 2

Hi @mikybars your issue is a regression on our part in v4 I believe, so we will get a fix published shortly.

As for what you are seeing @sean-legitscript on v3 there haven't been any changes so not sure what could be causing that. Could you try adding the property provider.logs.frameworkLambda: true in your serverless.yml, then you should be able to see the logs in Cloudwatch for the custom resource lambda.

from serverless.

Mmarzex avatar Mmarzex commented on June 22, 2024 1

@mikybars We updated v4 with a fix for this, if you want to run serverless update and try again?

from serverless.

mikybars avatar mikybars commented on June 22, 2024 1

Yep, it seems to be working now. No more hangs. Good job ;)

from serverless.

mikybars avatar mikybars commented on June 22, 2024

Thanks @sean-legitscript for reporting this as I was about to do the same thing 😅

In my case I have a PreSignUp hook set up for an existing (this fact is relevant) Cognito user pool and I was experiencing the same hangs that you describe.
After one week or so of painful debugging (1+ hour feedback loops) I can say that I finally figured it out and had it working. I don't want to bore anyone here with the gritty details but the problem lies within the custom-resources code provided by the serverless framework when you add the existing: true property in your config. This code, which is auto-generated as part of the package phase inside the .serverless folder, is responsible for provisioning custom resources in AWS. As I had the opportunity to find out this code is wrong:

export default {
  handler: handlerWrapper(handler, 'CustomResourceExistingCognitoUserPool')
};

As far as I'm concerned (I'm not a JS guy) ES6 modules are not supported in Node.js environments, which use CommonJS syntax instead:

module.exports = {
  handler: handlerWrapper(handler, 'CustomResourceExistingCognitoUserPool')
};

Btw, this would have been way easier to find out should the lambda function responsible for provisioning the custom resource had had a log group set up in CloudWatch in the first place. I guess anyone expected this to ever fail 🤷🏾

I can offer myself to fix this, btw 🙂

from serverless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.