Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Lambda Error : Error: Runtime failed to start: fork/exec /opt/bootstrap: no such file or directory

I am running the following solution from AWS Lambda,

https://aws.amazon.com/blogs/apn/aws-lambda-custom-runtime-for-php-a-practical-example/

While testing the lambda function.

sudo aws lambda invoke --function-name php-example-hello --region us-east-1 --log-type Tail --query 'LogResult' --output text --payload '{"name": "World"}' hello-output.txt | base64 --decode

I am getting the following error,

START RequestId: 29f05ee2-a003-45f4-9700-97a9ac33a528 Version: $LATEST
END RequestId: 29f05ee2-a003-45f4-9700-97a9ac33a528
REPORT RequestId: 29f05ee2-a003-45f4-9700-97a9ac33a528  Duration: 54.09 ms      Billed Duration: 100 ms         Memory Size: 128 MB     Max Memory Used: 12 MB
RequestId: 29f05ee2-a003-45f4-9700-97a9ac33a528 Error: Runtime failed to start: fork/exec /opt/bootstrap: no such file or directory
Runtime.ExitError

Any help will be appreciated.

like image 399
Kappa Avatar asked May 28 '19 07:05

Kappa


1 Answers

In AWS Lambda there is an answer it says check deployment again to steps and check result sometimes it's not probabily make dir so you can create yourself or you have to check permissions.

zip -r runtime.zip bin bootstrap
zip -r vendor.zip vendor/
zip hello.zip src/hello.php
zip goodbye.zip src/goodbye.php

enter image description here

like image 53
Cafer Yükseloğlu Avatar answered Oct 22 '22 01:10

Cafer Yükseloğlu