AWS container service: set max_map_count


I’m trying to run Elasticsearch on AWS container service. Here the documentation that I’m following:

The vm_map_max_count setting should be set permanently in

$ grep vm.max_map_count /etc/sysctl.conf


To apply the setting on a live system type: sysctl -w

Is there any way to set the vm.max_map_count via script? I don’t want to do it manually every time I run a new container.



I found a solution:

  1. create an empty container
  2. Launch an EC2 inside the previous container:
  3. Add the user data ( as follow:

Now the EC2 instance is properly configured.

Leave a Reply