Coder Social home page Coder Social logo

Comments (6)

kyeotic avatar kyeotic commented on May 20, 2024 1

Those logs came from cloudwatch, using the 1.4.3 deno-lambda-layer zip from the releases page.

from deno-lambda.

hayd avatar hayd commented on May 20, 2024 1

Sorry I should've cherry-picked the fix for 1.6.0, that error message is a red herring!

Hopefully we can get al2 in before 1.6.1, otherwise ensure the bootstrap fix make their way in to 1.6.1 anyhow.

from deno-lambda.

hayd avatar hayd commented on May 20, 2024

Are you running the executable locally?

Generally that won't work, AWS Lambda runs Amazon Linux 1 which requires a compatible binary (that isn't compatible with many linux distros). You can test using docker-lambda.

Or am I misunderstanding the issue? How are you getting this?

from deno-lambda.

hayd avatar hayd commented on May 20, 2024

I think I understand the issue.

It seems like the layer must be used as a layer, rather than as a function (I didn't think this was a requirement but perhaps it is now?). I am going to update the bootstrap to error properly:

deno executable not found in PATH

Will be fixed in #115 (see diff from bootstrap)

from deno-lambda.

hayd avatar hayd commented on May 20, 2024

So, it's actually that deno eval that tries to create the directory... which is surprising.

Fixed in al2 PR: 789e625

from deno-lambda.

revgum avatar revgum commented on May 20, 2024

Thank you very much for deno-lambda, it's really great!

I just wanted to add some details of things I found this morning as I was digging into a rough edge I bumped into.

I was getting this error bad deno executable along with some other errors in a couple of situations;

  • When the data payload to be returned exceeded the memorySize configured for the Lambda
  • When the response time exceeded the default 6 second configuration for Lambda
  • and then after configuring the Lambda timeout; when the response time exceeded the 30 second configuration for APIGateway
  • When I hadn't set DENO_FLAGS to allow writing (reverted to leaving it as default -A instead)

For other API calls that were designed to be faster (<30sec), everything is working fine.

Here's one scenario example of Cloudwatch logs with more context;


Check file:///tmp/runtime.js
--
DynamoDb client configured to us-west-2 region.

START RequestId: 6ea516e3-d7ec-4a81-85bd-12b21e787097 Version: $LATEST

memory allocation of 111809360 bytes failed

/opt/bootstrap: line 237:    27 Aborted                 (core dumped) DENO_DIR=/tmp/deno_dir DENO_PREFIX=$DENO_PREFIX DENO_FLAGS=$DENO_FLAGS NO_COLOR=true deno run $DENO_FLAGS /tmp/runtime.js
�[0m�[1m�[31merror�[0m: Could not create TypeScript compiler cache location: "/home/sbx_user1051/.cache/deno/gen"
Check the permission of the directory.

error: bad deno executable

Unexpected bootstrap error when calling AWS_LAMBDA_RUNTIME_API /init/error: {     "errorMessage": "State transition from Ready to InitError failed for runtime. Error: State transition is not allowed",     "errorType": "InvalidStateTransition" }

END RequestId: 6ea516e3-d7ec-4a81-85bd-12b21e787097

REPORT RequestId: 6ea516e3-d7ec-4a81-85bd-12b21e787097	Duration: 8612.69 ms	Billed Duration: 8613 ms	Memory Size: 256 MB	Max Memory Used: 256 MB
 ```

from deno-lambda.

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.