标签: amazon-web-services .net-core aws-api-gateway
我有一个API网关lambda授权器,当它失败时,我得到的只是
{ "Message": "User is not authorized to access this resource with an explicit deny" }
,状态码为403
我的lambda是用dotnet核心编写的。如果我的身份验证失败,并且我的状态代码应该为401,那么我正在做某事。所以只想知道我们是否可以自定义此行为
答案 0 :(得分:0)
根据此AWS documentation,当Lambda授权器函数返回带有明确拒绝的IAM策略文档时,您将看到确切的错误消息。