Delete logs in ElasticSearch after certain period

No, that curl command will only delete the specified INDEXNAME.

You're on your own for that, as I stated. Curator is normally the go-to solution for that, but AWS made their version of ES incompatible with it. You will have to run the above command manually, or find some way to script it.