Unable to create EC2 Instance

Hi,

I just started learning Ansible.

I am trying to create EC2 instance from my managed host, configured on Mac OS Sierra but getting below error.

Playbook:

Output Error:

Kindly help.

You would want to use image_id instead of image:

tasks:

  • ec2_instance:
    image_id: ami-abc123