【发布时间】:2016-11-21 01:04:32
【问题描述】:
我为 API 网关端点创建了 2 个授权方。一个手动使用控制台,另一个使用 boto3。 手动创建的效果很好,但是使用脚本创建的会出现主题行中提到的错误。如果你检查这两个授权人的内容,它们是相同的。
可能缺少的部分是什么?我不认为这是对 lambda 的无效权限,因为它在手动配置时对一个授权方起作用。
The code for the same is as below:
response = client.create_authorizer(
restApiId=apiid,
name=authName,
type='TOKEN',
authType='custom',
authorizerUri=authorizerUri,
##arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:<AcctId>:function:CustomAuthorizer/invocations
identitySource='method.request.header.Authorization',
identityValidationExpression= '.*',
authorizerResultTtlInSeconds=300
)
出现错误: 2016 年 7 月 18 日星期一 11:53:04 UTC:由于配置错误,执行失败:Lambda 函数的权限无效 2016 年 7 月 18 日星期一 11:53:04 UTC:由于配置错误,执行失败:授权者错误 2016 年 7 月 18 日星期一 11:53:04 UTC:AuthorizerConfigurationException
【问题讨论】:
标签: amazon-web-services aws-lambda