访问API网关时缺少身份验证令牌? [英] Missing Authentication Token while accessing API Gateway?

查看:528
本文介绍了访问API网关时缺少身份验证令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过AWS API Gateway调用Lambda函数. 当我提到身份验证类型NONE时,它可以很好地工作,但是API成为公开的,任何具有URL的人都可以访问我的API. 为了使API调用安全,我使用了身份验证类型AWS_IAM和 还向我的用户附加了AmazonAPIGatewayInvokeFullAccess策略,但出现此错误:

I am trying to call a Lambda Function through AWS API Gateway. When I mention Authentication type NONE it works fine but API become public and anyone with url can access my API. To make API call secure, I am using Authentication type AWS_IAM and also attached AmazonAPIGatewayInvokeFullAccess policy to my user but getting this error:

{ message: "Missing Authentication Token"}

我不知道我在这里想念什么.

I don't know what I am missing here.

推荐答案

我认为您直接尝试访问API链接,因为API是使用IAM角色保护的,并且您必须提供AWS身份验证(即访问密钥和秘密密钥.

I think you are directly trying to access API link, this won't work because API is secured using IAM role and you must provide AWS authentication i.e Access key and Secret key.

使用Postman Chrome扩展程序测试您的API: http://docs .aws.amazon.com/apigateway/latest/developerguide/how-to-use-postman-to-call-api.html

Use the Postman Chrome extension to test your API: http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-use-postman-to-call-api.html

这篇关于访问API网关时缺少身份验证令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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