Lambda Function URL is throwing 502

0

I have a netcore webapi deployed in Lambda its own URL is working fine in public but its Function URL is not working anywhere while that has AUTH= NONE. Am I missing something in the configuration? Any help is greatly appreciated. Getting these messages in theclodwatch. [Information] Microsoft.Hosting.Lifetime: Content root path: /var/task fail System.NullReferenceException: Object reference not set to an instance of an object.

已提問 1 年前檢視次數 314 次
2 個答案
0

Thanks for the response. I tried in the vpc under private and public subnet but still same issue. I tried outside vpc but the same. The original url means the url i got in the Visual Studio after deployment is working every where. Thanks

已回答 1 年前
0

When using NONE auth type, does the Lambda function have the resource-based policy to make the function public? Should look like this:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "StatementId": "FunctionURLAllowPublicAccess",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "lambda:InvokeFunctionUrl",
      "Resource": "arn:aws:lambda:us-east-1:12345678910:function:<Function Name>",
      "Condition": {
        "StringEquals": {
          "lambda:FunctionUrlAuthType": "NONE"
        }
      }
    }
  ]
}

Here is text from the documentation on this: If you choose the NONE auth type, Lambda doesn't use IAM to authenticate requests to your function URL. However, users must still have lambda:InvokeFunctionUrl permissions in order to successfully invoke your function URL.

https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html

AWS
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南