title: Why can't I access my RabbitMQ broker on AWS?
body: <p>I'm trying to communicate with my RabbitMQ server using a C# .NET Core 3.1 client. If I run a RabbitMQ server on my local machine, it works fine. If I try to do the same on the RabbitMQ server I started on AWS, I cannot reach it.</p>
  <p>C# client:</p>
  <pre><code>        var factory = new ConnectionFactory
          {
              HostName = amqp.Server,
              UserName = amqp.Username,
              Password = amqp.Password,
              Port = amqp.Port
          };
  
          _connection = factory.CreateConnection();
  </code></pre>
  <p>I checked the values of amqp.Server, Username, Password and Port and all of them are correct. Anyways, it returns the following exception:</p>
  <blockquote>
  <p>RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable
  ---&gt; System.AggregateException: One or more errors occurred. (Connection failed)
  ---&gt; RabbitMQ.Client.Exceptions.ConnectFailureException: Connection failed
  ---&gt; System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (10060): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond</p>
  </blockquote>
  <p>First I thought, the AWS firewall may block requests from the used port (5671, AMQPs), but trying to connect using Telnet worked.</p>
  <p>Screenshot of the current ACL settings:
  <a href="https://i.stack.imgur.com/F1HLV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F1HLV.png" alt="enter image description here" /></a></p>
  <p>Same setting is used for Outbound rules too. But to be honest I am not sure whether I have to use TCP or another traffic type.</p>
  <p>EDIT: Access type is set to &quot;Public access&quot;. I forgot to say that. My apologies.</p>
  <p>Does anyone have an idea what to try?</p>
  <p>EDIT2: Here's the output of the CLI command list-brokers:
  <a href="https://i.stack.imgur.com/qQC6N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qQC6N.png" alt="enter image description here" /></a></p>