title: Deploy ElasticSearch Docker Container to AWS Fargate
body: <p>I'm trying to deploy non custom single node elasticsearch:7.8.1 docker container to AWS ECS Fargate.</p>
  <p>On my local I simply executed:</p>
  <pre><code>docker run -p 9200:9200 -p 9300:9300 -e &quot;discovery.type=single-node&quot; docker.elastic.co/elasticsearch/elasticsearch:7.8.1
  </code></pre>
  <p>And it spined up ES container for me which my app utilises. I want do have the same container available in the cloud.</p>
  <p>How can I do it?</p>
  <p><strong>Update:</strong> I was able to deploy ES to Fargate but it fails in attempt to access it with error message:</p>
  <pre><code>ERROR: [3] bootstrap checks failed
  [1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
  [2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
  [3]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
  </code></pre>
  <p>After short googling I found <a href="https://discuss.elastic.co/t/docker-max-virtual-memory-areas-vm-max-map-count-is-too-low/221779/2" rel="nofollow noreferrer">this post</a> where they fixed the problem by turning single node mode on. I dont quite understand how I can turn it on in Fargate, is it in task definition or how?</p>
  <p>Another question would be what is the most common way of running ES in AWS? in EC2 or AWS ES service? My aim is to setup infra as quickly as I can. I have got .net core app running in docker using elastic search.</p>