Unable to connect to Elasticsearch running on an ec2 instance via the public ip

Following is my yml file:

cluster.name: elasticsearch-elktest

cloud.aws.access_key: accesskey

cloud.aws.secret_key: secretkey

cloud.aws.region: us-west-2

network.host: ec2

network.publish_host: ""

discovery.type: ec2

discovery.ec2.host_type: "public_ip"

discovery.ec2.ping_timeout: "10s"

discovery.zen.ping.multicast.enabled: false

discovery.zen.ping.unicast.hosts: 0.0.0.0

discovery.ec2.tag.Name: "timselktest-ElasticSearch"

network.host: 0.0.0.0

http.cors.enabled: true

http.cors.enabled: true

http.cors.allow-origin: "*"

on running :

curl -XGET http://localhost:9200
{
"name" : "La Nuit",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "2.3.3",
"build_hash" : "218bdf10790eef486ff2c41a3df5cfa32dadcfde",
"build_timestamp" : "2016-05-17T15:40:04Z",
"build_snapshot" : false,
"lucene_version" : "5.5.0"
},
"tagline" : "You Know, for Search"
}

But I cant connect to the public ip on port 9200. Please help me