需要执行以下步骤:
定位使用了旧认证器的 API 网关。
确认 Lamda 表达式已更新代码并重新发布。
确认使用新 Lamda 认证器的 authorizer ID。
执行以下 CLI 命令:
aws apigateway update-authorizer --rest-api-id xxxxxx --authorizer-id xxxxxx --patch-operations op='replace', path='/authorizerUri', value='arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:111122223333:function:new-lambda-authorizer/invocations'
Be sure to replace "rest-api-id" and "authorizer-id" with the values of your API Gateway and authorizer respectively.