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

Context Deadline for Lambda Running from API GW #580

Open
js10x opened this issue Jan 5, 2025 · 0 comments
Open

Context Deadline for Lambda Running from API GW #580

js10x opened this issue Jan 5, 2025 · 0 comments

Comments

@js10x
Copy link

js10x commented Jan 5, 2025

When running a lambda handler that is executed from an API Gateway integration, does the context timeout align with the timeout set on the lambda function itself? I am getting context deadline exceeded errors when the invoke takes a little longer than ~2 seconds, despite me having a 15 minute timeout on the lambda itself.

Sample:

func main() {
 lambda.StartWithOptions(handler, lambda.WithContext(context.Background())
}

func handler(ctx context.Context, req *events.APIGatewayProxyRequest) (*events.APIGatewayProxyResponse, error) {
 // code runs here that takes ~2 seconds or more, but less than 15 minutes (timeout set on lambda)
 return nil, nil // omitted for brevity
}
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