Writing a custom API Gateway Lambda authorizer using C# and Im using the REQUEST
authorizer (not TOKEN). Looking at their documentation I should have an available parameter called methodArn
but looking at the class APIGatewayProxyRequest
it's not listed from their SDK.
Is this the correct input parameter to use for my lambda authorizer?
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...>
}
}
Try using APIGatewayCustomAuthorizerRequest
instead of APIGatewayProxyRequest
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.