A restart of elasticsearch on all the cluster nodes fixed the issue. I think it has to do with the fact that the IAM role was created and assigned to these ec2 instances that were already running. Thought will provide an update if somebody else faces the same issue.