I am sending logs from different environments to AWS ElasticSearch using fluentd. The AWS ES is created using a CloudFormation stack. How can do following two things:
I could not find anything in CloudFormation stack to add retention policy.
There is no such feature in Cloudformation so far. What can be done is to use Lambda with schedule to apply these retention rules. The aws documentation contains an example using lambda and the curator library.