Couldn't connect to Elasticsearch

I am trying to connect to the configured Elasticsearchservice instance in AWS from my machine and getting the following error. Any help is appreciated.

ven@ven:~$ sudo metricbeat setup

Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch https://search-Ven-demo-sjlkajsdlkajsdasdas.us-east-2.es.amazonaws.com:9200: Get https://search-Ven-demo-sjlkajsdlkajsdasdas.us-east-2.es.amazonaws.com:9200: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)]

Is it a firewall?

I also having issue with connecting to Elasticsearch after installing x-pack.

Now it cant draws data from elasticsearch. Does anyone faced this issue too?

@warkolm thanks for the response. No I should have port 443 in yml file and changed it now it works perfect.

I want to create dashboards for the metricbeat data any suggestions?

Hi vnkasturi, may i know which file did you make changes to? You just change the port to 443?