ec2_ami : FAILED! => {"changed": false, "failed": true, "msg": "unsupported parameter for module: root_device_name"}

I've never used ec2_ami myself but according to the docs on
http://docs.ansible.com/ansible/ec2_ami_module.html root_device_name
is available since ansible 2.3.

I guess you're using an older version?

Dick