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

查看:26
本文介绍了获取消息:禁止来自 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.

为了方便起见,我现在将网关设置为 Mock.

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

API的Get方法中,Authorization设置为None,API Key为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 Key Required' 选项设置为 true,请检查以下内容.

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

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

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

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