【问题标题】:AWS API Gateway Lambda authorizer REQUEST type does not have methodArn?AWS API Gateway Lambda 授权方 REQUEST 类型没有 methodArn?
【发布时间】:2020-07-08 11:34:31
【问题描述】:

使用 C# 编写自定义 API Gateway Lambda 授权方,我使用 REQUEST 授权方(不是 TOKEN)。查看他们的documentation 我应该有一个名为methodArn 的可用参数,但查看APIGatewayProxyRequest 类,它没有从他们的SDK 中列出。

这是用于我的 lambda 授权器的正确输入参数吗?

namespace Amazon.Lambda.APIGatewayEvents
{
    public class APIGatewayProxyRequest
    {
        public APIGatewayProxyRequest();

        public string Resource { get; set; }
        public string Path { get; set; }
        public string HttpMethod { get; set; }
        public IDictionary<string, string> Headers { get; set; }
        public IDictionary<string, IList<string>> MultiValueHeaders { get; set; }
        public IDictionary<string, string> QueryStringParameters { get; set; }
        public IDictionary<string, IList<string>> MultiValueQueryStringParameters { get; set; }
        public IDictionary<string, string> PathParameters { get; set; }
        public IDictionary<string, string> StageVariables { get; set; }
        public ProxyRequestContext RequestContext { get; set; }
        public string Body { get; set; }
        public bool IsBase64Encoded { get; set; }

        <...SNIP...>
    }
}

【问题讨论】:

    标签: c# amazon-web-services aws-api-gateway .net-core-3.1 lambda-authorizer


    【解决方案1】:

    尝试使用APIGatewayCustomAuthorizerRequest 而不是APIGatewayProxyRequest

    【讨论】:

      猜你喜欢
      • 2017-04-13
      • 2019-12-28
      • 1970-01-01
      • 2020-06-17
      • 2021-01-08
      • 2019-05-15
      • 2018-04-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多