Copy paste the below userdata into userdata section when creating a new EC2 instance on AWS EC2. Userdata section is available in Advanced Options Section.
#!/bin/bash
echo BEGIN
sudo yum update -y
sudo yum install -y wget git
wget https://packages.chef.io/files/stable/chefdk/1.4.3/el/7/chefdk-1.4.3-1.el7.x86_64.rpm
sudo rpm -ivh chefdk-1.4.3-1.el7.x86_64.rpm
echo "export PS1='chef-workstation $'" >> /home/ec2-user/.bashrc
echo END
This job takes 15min to execute based on the instance you have selected. Please click here for the procedure to monitor logs.