Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime.InvalidEntrypoint #554

Closed
LiamDotPro opened this issue Mar 9, 2024 · 0 comments
Closed

Runtime.InvalidEntrypoint #554

LiamDotPro opened this issue Mar 9, 2024 · 0 comments

Comments

@LiamDotPro
Copy link

Hello,

I'm trying to get started with this package and I'm running into this error:

INIT_REPORT Init Duration: 1.80 ms	Phase: invoke	Status: error	Error Type: Runtime.InvalidEntrypoint
START RequestId: d515bace-9d56-4982-bd7c-0b5d3dfdd550 Version: $LATEST
RequestId: d515bace-9d56-4982-bd7c-0b5d3dfdd550 Error: fork/exec /var/task/bootstrap: exec format error
Runtime.InvalidEntrypoint
END RequestId: d515bace-9d56-4982-bd7c-0b5d3dfdd550
REPORT RequestId: d515bace-9d56-4982-bd7c-0b5d3dfdd550	Duration: 21.80 ms	Billed Duration: 22 ms	Memory Size: 128 MB	Max Memory Used: 3 MB

I appreciate that this seems to be an error when trying to use Amazon Linux 2023 image and I'm using the exact same code as presented on this repo. I've to the best of my abilities tried to ensure I've complied my binary to be correct as possible (I've even installed ubuntu to ensure my windows system wasn't causing the issue). But for whatever reason I'm just running in circles contiously getting the above output from the lambda.

Here's my go program:

package main

import (
	"github.com/aws/aws-lambda-go/lambda"
)

func hello() (string, error) {
	return "Hello λ!", nil
}

func main() {
	// Make the handler available for Remote Procedure Call by AWS Lambda
	lambda.Start(hello)
}

I'm building and zipping using

GOOS=linux GOARCH=amd64 go build -o bootstrap main.go
zip lambda-handler.zip bootstrap

image

I'm simply uploading the zip created into my lambda function but with no success, I've honestly tried a lot and I'm not looking for some help as I don't seem to be able to find what I need online and I'm not sure what to try next..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant