'RabbitMQ: how to use amqps?

I have a c# application (NET Framework 4.5) and RabbitMQ.Client (3.6.9). When I use this:

 ConnectionFactory connectionFactory = new ConnectionFactory
                {
                    Uri = "amqp://xxx.xxx.xxx.27",
                    UserName = "guest",
                    Password = "guest"
                };

it connects to the broker fine. If I use Uri = "amqps://xxx.xxx.xxx.27" then I receive an error

Error: None of the specified endpoints were reachable

How I can use amqps ? Note. AWS RabbitMQ required amqps.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source