How to manage index in AWS ES

With more and more logs stored on the Elasticsearch, how to manage the size of logs to make sure it will not end up full disks.

I can think if we can create a cron job to delete the olders indices?

Have a look at Curator.

I just checked it out. but it was not clear for me that where to add action files

It doesn't matter where you place the action files.