I would recommend you have a look at the docs. In order for Elasticsearch nodes to be able to communicate and form a cluster network.host
must be set to an IP address the other nodes can reach, e.g. 0.0.0.0
(all interfaces).
node.name: master
cluster.initial_master_nodes: ["ip-10-0-140-82.us-west-2.compute.internal", "ip-10-0-136-138.us-west-2.compute.internal"]
As outlined in the docs I linked to:
The node names used in the
cluster.initial_master_nodes
list must exactly match thenode.name
properties of the nodes.
This is something you need to fix. There may be other issues as well, so please go through the docs carefully.
I would also recommend having 3 master eligible nodes in the cluster as fewer than this will mean the cluster is not highly available.