简体   繁体   English

在不使用http流量的情况下测试在AWS EC2上部署的API

[英]test an API deployed on AWS EC2 whithout using http traffic

For security reasons I can't add the http traffic to my EC2 machine security group, I have only the SSH port open So I'm looking for some solutions to be able to test my API deplyed on AWS-EC2 using only the PORT22, my server is running on : http://ec2xxxxxx:5000/test 出于安全原因,我无法将http通信添加到我的EC2机器安全组中,我仅打开了SSH端口,因此我正在寻找一些解决方案,以便仅使用PORT22即可测试AWS-EC2上的API,我的服务器正在运行: http:// ec2xxxxxx:5000 / test

Thanks in advance! 提前致谢!

If you SSH tunnel you would basically test as if you are using localhost. 如果您使用SSH隧道,则基本上可以像使用localhost一样进行测试。 If you have security concerns, maybe best option is to run additinal micro instance in same VPC (would work in classic as well, more variations possible from internal up to full blown external ip, depending on your security concerns) and allow ONLY it's IP on port 5000. That way you can test HTTP properly without really worrying about opening main instance to world... sorry for typos, writting from a phone... 如果您有安全隐患,也许最好的选择是在同一VPC中运行附加微型实例(也可以在经典VPC中运行,根据您的安全隐患,可以从内部到完全外部ip进行更多的更改),并且仅允许使用IP端口5000。这样一来,您就可以正确测试HTTP,而无需担心要向世界打开主实例了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM