awslabs / aws-lambda-go-api-proxy

lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Internal Server Error

Muzeebshaik opened this issue · comments

I'm attempting to execute my Go application within a lambda. I am using a fiber adapter, and when I try to invoke any of the endpoints from the API GATEWAY, I constantly receive an internal server error.
usually my endpoint looks like "/components/:id"
Does the fiber adapter just support endpoints without route parameters?

Below is the code I have in lambda
`var fl *fiberLambda.FiberLambda

func init() {
// create a new fiber instance
app := fiber.New()

app.Get("/components/:Id", getComponents)
app.Post("/components/:Id", putComponents)

fl = fiberLambda.New(app)

}
func handler(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
return fl.ProxyWithContext(ctx, request)
}
func main() {
lambda.Start(handler)

}`

When I trigger lambda using API gateway I am facing
could not resolve TCP address for addr test-invoke-source-ip