aws / aws-lambda-nodejs-runtime-interface-client

Apache License 2.0
177 stars 57 forks source link

Error occured. (arm64, docker) #77

Open sdg9670 opened 10 months ago

sdg9670 commented 10 months ago

Env: ubuntu, arm64, docker(node 18 image)

// test.js
exports.handler = async (event) => {
    const response = {
        statusCode: 200,
        body: JSON.stringify('Hello from Lambda!'),
    }
    return response
}
npm install aws-lambda-ric
npx aws-lambda-ric test.handler

I got this error.

Executing 'test.handler' in function directory '/workspaces/test'
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string: construction from null is not valid
Aborted (core dumped)

how can I solve this problem?

amitizle commented 10 months ago

We're having the same issue, @sdg9670 did you manage to resolve it?

amitizle commented 10 months ago

We resolved it by using aws-lambda-ric@2.1.0 and not the latest version.

sdg9670 commented 10 months ago

@amitizle I gave up to use arm64 cpu. lol...

amunhoz commented 10 months ago

I'm having the same problem in amd64 with latest version, any clue?

amitizle commented 10 months ago

@amunhoz see my comment in here - try and use version 2.1.0

schuettc commented 8 months ago

We resolved it by using aws-lambda-ric@2.1.0 and not the latest version.

This is working for me. But quite difficult to figure out. Would like an update on when ^3 will work with arm64