问题描述
我有一个作为REST API公开的AWS Lambda函数.
I have an AWS Lambda function that is exposed as a REST API.
通过aws lambda控制台上的测试"按钮调用它时,它将起作用.
When it is invoked it via the Test button on aws lambda console, it works.
通过在线REST客户端调用它时,出现403错误.它是根据要求创建的-无需身份验证(打开).
When it is invoked via a online REST client, i get 403 error. It was created as requiring - no authentication (Open).
我缺少什么配置?
推荐答案
假定Lambda是通过AWS API网关公开的.之所以会在新的不进行身份验证" API网关资源上获得403,是因为您尚未部署更改.
Supposedly the Lambda is exposed through an AWS API Gateway.One reason why you'd get 403 on a fresh "no authentication" API Gateway resource is because you haven't yet deployed your changes.
在API Gateway Console中,单击Actions
下拉列表,然后选择Deploy API
.
In API Gateway Console click the Actions
dropdown and select Deploy API
.
你应该很好.
这篇关于AWS Lambda函数REST API端点-403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!