-
Notifications
You must be signed in to change notification settings - Fork 559
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
The incoming event is not a valid request from Amazon API Gateway or an Application Load Balancer #245
Comments
Hey @balihb - the framework expects an event that is shaped like an API Gateway or ALB proxy event. That doesn't mean that the call must come from API Gateway or ALB, just that the event should have the same model. If you wanted to, you could use the If these two Lambda functions are meant to be separate services - meaning they have different scaling factors and will eventually be managed by separate teams - I'd recommend putting an actual API in-between them. |
Can I resolve this @balihb? |
I've tried to emulate an api gateway request with AwsProxyRequest, but I haven't been able to figure out a way to access the data from the current request (so I can maybe forward it to the next request). |
If you simply want to forward the current request to the other Lambda function you can access the incoming event from the |
Assuming this issues is solved. Closing. |
I got the same issue when Added cloudwatch event to lambda function |
Hi @Thanh3d, what event are you trying to handle? Is it sent by an AWS service or are you calling the Lambda function directly? In general, you have two options:
|
I am trying to deploy the spring boot project generated by Maven archetype for Spring Boot 2.x on AWS lambda and calling its /ping endpoint with the help of AWS API gateway but I am getting the same error reported here i.e The incoming event is not a valid request from Amazon API Gateway or an Application Load Balancer Here is my code: https://my-lambda-code-bucket.s3.us-east-2.amazonaws.com/my-service-1.0-SNAPSHOT-lambda-package.zip Here is my api endpoint: |
Hi @mohit-saw, make sure that you have configured API Gateway as a proxy integration. See screenshot here. If this is not the root cause of the issue, could you share how you deployed and configured the function + API Gateway? Did you use the SAM file? |
I'm getting the same error:
I have the following configuration:
I think a http method is expected on the request judging by what I see here:
|
Do we have a sample handler class for this error? This is happening because the warmup plugin sends an event but it is not a gateway event. We should have a condition to return directly if the request is coming from warmup plugin. |
Have you considered using provisioned concurrency instead? Much more reliable |
It's been a while since I've played with this and I don't have the sample to provide it. Meanwhile we've dropped the warmup part. |
Thanks for the answer, We have also decided to switch to provisioned concurrency |
Hi, I am trying to invoke function through sam local invoke then I am facing same error, I am trying to run this through sam.yaml file |
May I get any solution |
Scenario
I'm trying to create two Spring Boot function. One supposed to call the other, I can call both from outside (Api Gateway), but if I try to do it directly with lambda invoke I get this:
The incoming event is not a valid request from Amazon API Gateway or an Application Load Balancer
either from code or from the lambda console.
What am I missing?
Expected behavior
Works the same way with invoker as through api gateway.
Actual behavior
Only works with api gateway.
Steps to reproduce
The code is here:
https://github.com/balihb/fifi
Full log output
The text was updated successfully, but these errors were encountered: