且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AWS SQS从AWS外部接收消息

更新时间:2021-11-22 04:19:41

  1. 我的想法正确吗?

不,不是.

您误解了FAQ中的(肯定有些不清楚)信息.

You're misinterpreting the (admittedly somewhat unclear) information in the FAQ.

SQS可以从Internet上的任何位置访问和使用.它唯一公开的接口是HTTP(S).实际上,除非EC2实例实际上具有对Internet的出站访问权限,否则从EC2内部无法访问SQS.

SQS is accessible and usable from anywhere on the Internet. Its only exposed interface is HTTP(S). In fact, from inside EC2, SQS is not accessible unless the EC2 instance actually has outbound access to the Internet.

文档中提出的重点不是要使您在" AWS内才能使用队列,而是要拥有一组授权的AWS凭证与队列一起工作.¹

The point being made in the documentation is not that you need to be "inside" AWS to use queues, but rather that you need to be in possession of an authorized set of AWS credentials in order to work with queues.¹

如果您有一个AWS账户,那么您就有凭据,并且可以使用SQS.无需从内部" AWS访问队列.

If you have an AWS account, you have credentials, and you can use SQS. There is no requirement that you access the queue from "inside" AWS.

选择最靠近服务器的端点(以获得最低的延迟),那么您应该可以从任何地方打开它并对其进行访问.

Choose the endpoint closest to your servers (for lowest latency) and you should find it open and accessible, from anywhere.

¹队列可以配置为在创建后允许匿名访问. (不要这样做,我只是说有可能.)常见问题解答的这一部分似乎是指操作的子集,例如创建队列.

¹Queues can be configured to allow anonymous acccess after they are created. (Don't do it, I'm just saying it is possible.) This section of the FAQ seems to be referring to a subset of operations, such as creating queues.