"The incoming event is not a valid request from Amazon API Gateway or an Application Load Balancer" lambda Postman

0

I am trying to do the most basic Proof of Concept api but every time I call my lambda function URL from Postman, I get

com.amazonaws.serverless.exceptions.InvalidRequestEventException: 
    The incoming event is not a valid request from Amazon API Gateway or an Application Load Balancer

I have the Auth type: NONE, CORS: "*", Allow methods: "*"

Policy:

{
      "Sid": "FunctionURLAllowPublicAccess",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "lambda:InvokeFunctionUrl",
      "Resource": "arn:aws:lambda:us-east-1:11111:function:my-api",
      "Condition": {
        "StringEquals": {
          "lambda:FunctionUrlAuthType": "NONE"
        }
      }
    }

I found this issue which says that "the framework expects an event that is shaped like an API Gateway or ALB proxy event." and links to this doc However, how would I do this in Postman?

This AWS Doc suggests that I don't need to do that though:

If your function URL uses the NONE auth type, you don't have to sign your requests using SigV4. You can invoke your function using a web browser, curl, Postman, or any HTTP client.

However, perhaps the problem is the conversion of the request into the Amazon API Gateway payload schema? From the same document:

When a client calls your function URL, Lambda maps the request to an event object before passing it to your function. Your function's response is then mapped to an HTTP response that Lambda sends back to the client through the function URL.

The request and response event formats follow the same schema as the Amazon API Gateway payload format version 2.0.

Anyone know what I need to change to be able to call a simple GET request from a browser/Postman?

질문됨 일 년 전137회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠