Questions tagged lambda

Explore the latest questions and answers asked by our top developers.

Endless import of matplotlib in Lambda Container: Matplotlib is building the font cache; this may take a moment

I am using the following Docker Image as a Lambda Container. When I invoke the Container, it exceeds the time limit of 15 min because of the matplotlib import building the font cache. I tried all the tips provided to this issue on Stack Overflow but it is not working. Does anybody know some ways […]

By Buggorilla
Published
Categorised as containers, docker, lambda, matplotlib, python Tagged , , , ,

Using container image for Lamda function

I have a very simple Lambda function that I’d like to test locally. app.py def lambda_handler(event, context): return "hello" Dockerfile FROM public.ecr.aws/lambda/python:3.8 COPY app.py . CMD [ "app.lambda_handler" ] After I build my image with docker build -t hello-world-3 . I can’t run it locally: docker run -p 9000:8080 -it hello-world-3 [INFO] (rapid) exec ‘/var/runtime/bootstrap’ […]

By Omega
Published
Categorised as docker, lambda, python Tagged , ,

Docker running amazon/aws-lambda-nodejs JSON errors

Issue: Running into this error within Docker lambda logs …ERROR Invoke Error {"errorType":"SyntaxError", "errorMessage":"Unexpected end of JSON input","stack": ["SyntaxError: Unexpected end of JSON input"," at JSON.parse (<anonymous>)"," at Runtime.handleOnce (/var/runtime/Runtime.js:67:14)"]} When using a fetch: … await fetch(url, requestOptions) .then(function (response) { if (response.ok) { return response.json(); } return false; }); Called via this simplified request […]

By theMidwest
Published
Categorised as cors, docker, lambda, node.js, webpack Tagged , , , ,

Docker running amazon/aws-lambda-nodejs Invoke errors

Issue: Running into this error within Docker lambda logs …ERROR Invoke Error {"errorType":"SyntaxError", "errorMessage":"Unexpected end of JSON input","stack": ["SyntaxError: Unexpected end of JSON input"," at JSON.parse (<anonymous>)"," at Runtime.handleOnce (/var/runtime/Runtime.js:67:14)"]} When using a fetch: … await fetch(url, requestOptions) .then(function (response) { if (response.ok) { return response.json(); } return false; }); Called via this simplified request […]

By theMidwest
Published
Categorised as cors, docker, lambda, node.js, webpack Tagged , , , ,

Is it possible to have a docker container with multiple lambda functions on it?

Scenario I have several lambda functions that will all work under the same enviroment (node v14.x). These functions will be independently (maybe in the future they will need to communicate with each other) Problem I have seen that we can use public.ecr.aws/lambda/nodejs:14.2021.12.23.17 image to use Node’s image. But in this example we are talking about […]

By Null
Published
Categorised as amazon-web-services, aws-lambda, docker, lambda Tagged , , ,

AWS Image function: [Errno 30] Read-only file system

I’m following the tutorial to deploy an image as as serverless service. I tried to use it to deploy easyocr. It works in local, it works on localhost, I’m able to deploy the serverless-service but when I try to use easyocr.Reader(), it gives me this error: { "errorMessage": "[Errno 30] Read-only file system: ‘model/temp.zip’", "errorType": […]

{"errorMessage": "Unable to unmarshal input: Expecting value: line 1 column 1 (char 0)", "errorType": "Runtime.UnmarshalError", "stackTrace": []}

I followed this tutorial. Steps: I downloaded this github. from where I installed the project, I executed this: docker build -t logbert-lambda . docker run -p 8080:8080 logbert-lambda I opened my navigator and I typed: http://localhost:8080/2015-03-31/functions/function/invocations It gave me this error: {"errorMessage": "Unable to unmarshal input: Expecting value: line 1 column 1 (char 0)", "errorType": […]

By avekia1
Published
Categorised as amazon-web-services, docker, lambda, python Tagged , , ,

Localstack.services.edge: Unable to find forwarding rule for host "0.0.0.0:4566"

I run a lambda function using localstack and sam. localstack is running on https://0.0.0.0:4566 . I tried running lambda with the command sam local invoke -e ./data.json , the response is normal. But when I try to send parameters to lambda through Vuejs (I send request to https:0.0.0.0:4566), I get error INFO:localstack.services.edge: Unable to find […]

By Quang L
Published
Categorised as docker, lambda, localstack, sam, vue.js Tagged , , , ,

failed to create a docker for node-alpine in aws lambda

I have got the following error while trying to create a docker image for aws lambda base on node js typescript image (NestJs) this error occurred also when i use sample app.js file with handler function internal/modules/cjs/loader.js:905 throw err; ^ Error: Cannot find module ‘/function/main.handler’ at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15) at Function.Module._load (internal/modules/cjs/loader.js:746:27) at Function.executeUserEntryPoint [as runMain] […]

By yuksi
Published
Categorised as docker, lambda, nestjs, node.js Tagged , , ,

Running database migrations using fastapi, alembic, docker, lambda

This is something thats been breaking my brain all day, its the last bit that needs doing to get this project up and running. The project is a fastapi app that is using alembic for managing migrations. I’ve setup a lambda function for the app (using a ecr container) and that works well, but I […]

By Devon Ray
Published
Categorised as cdk, docker, fastapi, lambda Tagged , , ,
1 2 3 5

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq