无法通过GPRS连接调用AWS API Gateway GET URL [英] Unable to invoke AWS API Gateway GET URL with GPRS connection

查看:79
本文介绍了无法通过GPRS连接调用AWS API Gateway GET URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过GPRS AT-Commands调用已部署的API.我能够进行HTTPS调用,例如在 https://www.amazon.jobs/上进行GET给了我200分,反应非常热烈.但是,我尝试在已部署的API上执行类似的操作,但最终收到601错误,这仅仅是GPRS的网络错误".

I'm attempting to call a deployed API through GPRS AT-Commands. I am able to make HTTPS calls, for instance doing a GET on https://www.amazon.jobs/ gives me a 200 and a large response. However I've tried doing something similar on my deployed API but end up receiving a 601 error which is simply just a "Network Error" for the GPRS.

该API可以通过我的浏览器运行,甚至可以在命令提示符下使用Python一线运行.我认为这可能与证书,标头或许多其他事情有关,但我不确定.GET to API Gateway和例如,GET到其他Amazon URL(例如amazon.jobs)之间有什么区别?更好的主意是创建一个中间端点,该中间端点可以构建对API网关的成功调用吗?

The API works through my browser or even a Python one-liner in the command prompt. I figure it has maybe something to do with certificates or headers or many other things but I'm not sure. What is the difference between a GET to API Gateway and say for example, a GET to other Amazon URLs (like amazon.jobs)? Would a better idea be to create an intermediary endpoint that could construct a successful call to API Gateway?

推荐答案

从评论中取消讨论...

Recapping the discussion from the comments...

API网关需要与支持服务器名称指示器(SNI)的客户端进行https连接.SNI是TLS的扩展,听起来SIM900 GPRS模块可能不支持它.

API Gateway requires a https connection with a client that support server name indicator (SNI). SNI is an extension to TLS and it sounds like the SIM900 GPRS module probably doesn't support it.

在没有SNI的情况下使用API​​网关目前还没有很好的选择.您可以在您的API前面放置一个CloudFront发行版,并启用CloudFront对专用IP的支持,从而消除了对SNI的需求.这是一个相当昂贵的选择,每月600美元.在ELB后面设置多个EC2实例会更便宜.

There's current no great option for using API Gateway without SNI. You can put a CloudFront distribution in front of your API and enable CloudFront's support for dedicated IPs which removes the need for SNI. That's a rather expensive option at $600 per month. It would be cheaper to set-up multiple EC2 instances behind an ELB.

这篇关于无法通过GPRS连接调用AWS API Gateway GET URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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