Questions tagged aws-lambda

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

Problem when creating a lambda function (AWS) using docker container: Lambda does not have permission to access the ECR image

I’m trying to create AWS’s lambda function using a docker container, I followed this guide. This is my code in def lambda_handler(event, context): print(‘dummy calling analyze_file’) print(‘DONE’) and this is my Dockerfile: FROM as build-image ARG FUNCTION_DIR="./" RUN yum update -y RUN yum install -y g++ make cmake unzip libcurl4-openssl-dev RUN pip install […]

By netanel
Categorised as aws-lambda, docker Tagged ,

How to test out Lambda Function locally inside Docker

I am learning AWS Lambda. Unfortunately, I can’t install SAM-TOOLKIT (sam-cli) on my host computer MAC, but I have Docker installed. Now, I work inside Docker flawlessly. I have started the docker-container (from base image of Linux Ubuntu) and have installed all necessary softwares inside the Container like "sudo", "JDK", "maven", "vim", "aws-cli", "sam-cli", etc. […]

How do you execute a script on destroy of a aws_instance?

In terraform, there’s a Destroy Time provisioner but these execute locally or I have to use SSH which means I have to run it from a server that has an SSH key to the remote server. I was wondering if it can be done on its own without having to do an SSH connection. I […]

Github workflow not getting the requirements.txt file while building docker image

I have a github workflow that is building the docker image, installing dependencies using requirements.txt and pushing to AWS ECR. When I am checking it locally all is working fine but when github workflow is running it is not able to access the requirements.txt file and shows the following error ERROR: Could not open requirements […]

AWS-Lambda Docker Image Error: "Error Message" : "Unable to import module ‘lambda_function’: cannot import name ‘etree’ from ‘lxml’ "

I am testing the aws-lambda function locally with my own input and the function runs perfectly, but when I attach the docker image to the function it quits with this import error. I have seen other questions about not finding the handler function, but I am successfully finding that. Docker File: ”’ FROM ADD […]

Rfast package not found when installing via docker

I’m a newbie to both R and Docker. I’m trying to install R packages in Dockerfile via the following command RUN Rscript -e "install.packages(c(‘Rfast’, ‘data.table’, ‘tools’, ‘DT’, ‘stringr’), repos = ‘’)" it works fine for all the packages except for Rfast. After I build my docker image and run it via AWS lambda function I […]

By Zulqarnain Haider
Categorised as aws-lambda, cran, docker, python, r Tagged , , , ,

Not able to connect to mysql in a different docker container

I have the following setup: docker-compose set up in a different project with a database, webserver and other services not important to the question docker container in a different project hosting a lambda function (followed the following tutorial The lambda function will check the DB for some data and if necessary will send notifications […]

By Null
Categorised as aws-lambda, docker, docker-compose, knex.js Tagged , , ,

curl: (56) Recv failure: Connection reset by peer aws lambda typescript

I have a small app (just testing it out for now) written in typescript and I would like to deploy to lambda. I have followed the official tutorial for creating lambda container images in AWS official guide. I have only changed the location of the handler to src/index.ts When I run curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d […]

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

How to make an image-based Lambda function run the function I want?

I have a Spring Boot application inside a Docker image. The image isn’t based on a AWS Lambda image. It’s based from the selenium/standalone-chrome image. The ENTRYPOINT of my Dockerfile is ["java","-cp","app.jar", "path to my"]. The leads to which further leads to, which is where the function’s actual code is at. […]

Running third-party command line software on AWS Lambda container image

Introduction I’m new to AWS and I’m trying to run Jellyfish on an AWS Lambda function with a python container image from an AWS base image. Context I want to achieve this by installing the software from source in my python container image (from AWS base image) and then uploading it to AWS ECR to […]

1 2 3 20

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