获取消息:禁止从AWS API网关回复 [英] getting message: forbidden reply from AWS API gateway

查看:83
本文介绍了获取消息:禁止从AWS API网关回复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在AWS上创建一个lambda服务,并通过API网关从外部对其进行访问,而无需进行身份验证或限制.

I am trying to create a lambda service on AWS and have it accessed from outside via the API gateway with no authentication or restriction required.

为了使事情变得容易,我现在将网关设置为模拟.

To make things easy I set the gateway for now to be a Mock.

在API的Get方法上,授权设置为None,API密钥为not required.

On the Get method of the API, the Authorization is set to None and the API Key is not required.

当我尝试此操作时,我得到{"message":"Forbidden"} (如果我将其连接到实际的lambda服务,则显示相同的消息).

When I try this, I get {"message":"Forbidden"} (same message if i connect it to the actual lambda service).

关于如何使其可访问性的任何建议?

Any advice on how to make it accessible?

推荐答案

如果将需要API密钥"选项设置为true,请检查以下内容.

If you set 'API Key Required' option to true, please check below.

  1. 您必须将"x-api-key" HTTP标头参数传递给API网关.
  2. 必须创建API密钥.
  3. 此外,您需要在API网关控制台上检查API密钥的使用计划.

这篇关于获取消息:禁止从AWS API网关回复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆