Using local logstash to connect to AWS Elastic

Followed these instructions
https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-vpc.html#es-vpc-security

I get the following error running the logstash command

[ERROR][logstash.javapipeline ][main] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<Manticore::UnknownException: Host name 'localhost' does not match the certificate subject provided by the peer (CN=*.us-east-1.es.amazonaws.com)>

https://localhost:9200 and https://localhost:9200/_plugin/kibana/app/kibana#/home?_g=() load up fine in the browser connecting to the elasticsearch service in AWS