如何使AWS api网关接受http而不是https [英] how to make AWS api gateway accept http instead of https

查看:153
本文介绍了如何使AWS api网关接受http而不是https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有API网关代理的Lambda函数.但是,API Gateway仅公开http s ,而不公开http.我到处搜索,但看起来API Gateway无法接受http.

I have a Lambda function proxied by API Gateway. However, API Gateway only expose https and not http. I searched everywhere but looks like API Gateway is not possible to accept http.

所以我的问题是如何将http客户端调用转换为https并发送到api网关?我问是因为我的客户只能拨打http电话,而且不会改变.

So my question is how to translate http client calls to https and send to api gateway? I am asking because my client can only make http calls and they won't change.

推荐答案

我最近和一个AWS代表打了一个4小时的电话,询问我们在生产阶段遇到的类似问题.我的情况是类似的,APIGateway中没有什么可以更改的来修复它(代表尝试了各种技巧,但似乎没有任何效果).因此,我们的结论是将EC2实例启动为APIGateway的代理服务器并转发所有流量.还有一些其他工作,例如转让域名,但总体来说还不错.在您的情况下,由于您只需要重定向HTTP流量,一个简单的ElasticBeanstalk代理应用程序就足够了(EB默认情况下使用HTTP,并且位于Nginx代理服务器的后面).

I recently had a 4 hour long phone call with an AWS representative about a similar problem we had in production stage. My situation was similar, there was nothing we could change in APIGateway to fix it (the rep tried all kinds of tricks, but nothing seemed working). So our conclusion was to spin up an EC2 instance as a proxy server for APIGateway and forward all the traffic. There was some additional work such as transferring the domain name, but overall it worked just fine. In your case, as you only need to redirect HTTP traffic, a simple ElasticBeanstalk proxy app might be enough (EB uses HTTP by default and is behind a Nginx proxy server).

这篇关于如何使AWS api网关接受http而不是https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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