By using AWS re:Post, you agree to the Terms of Use
/Segmentation fault when running wine on AWS Lambda container/

Segmentation fault when running wine on AWS Lambda container


I have this docker file that displays the wine version:

FROM electronuserland/builder:wine

ENTRYPOINT [ "wine", "--version" ]

When running this on my local docker, it returns the version of wine.

>> docker build -t wine-version .
>> docker run wine-version
>> wine-7.0

but when I uploaded it to AWS ECR and use it as my lambda function container, it printed exited with error: signal: segmentation fault Arch: x86_64

Expectation: wine version should be printed on the logs.

START RequestId: bc7b454b-22c9-4373-aaa3-091c8c4fa17c Version: $LATEST
END RequestId: bc7b454b-22c9-4373-aaa3-091c8c4fa17c
REPORT RequestId: bc7b454b-22c9-4373-aaa3-091c8c4fa17c	Duration: 4.32 ms	Billed Duration: 5 ms	Memory Size: 128 MB	Max Memory Used: 3 MB	
RequestId: bc7b454b-22c9-4373-aaa3-091c8c4fa17c Error: Runtime exited with error: signal: segmentation fault
1 Answers

You cannot run any docker container as a lambda function.

The docker container has to have either an AWS provided runtime or if you are creating a custom image, then you have to use the open source Lambda Runtime Interface Clients.

Another requirement is that the container image should have lambda code in the format that lambda expects the code to be in.

Have these requirements been met in the container image that you are trying to run as a lambda function?

If you want to learn more about how to run a container image in a lambda function, I will highly recommend this blog -

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions