Follow these steps to do what you are asking:
Create new user with password login
sudo useradd -m awsgui
sudo passwd awsgui
sudo usermod -aG admin awsgui
sudo vim /etc/ssh/sshd_config # edit line "PasswordAuthentication" to yes
sudo /etc/init.d/ssh restart
Setting UI based Ubuntu machine
In security group, open port 5901. Then ssh to the server instance. Run these commands to install UI and VNC
sudo apt-get update
sudo apt-get install ubuntu-desktop
sudo apt-get install vnc4server
Then run these commands and enter login password for VNC connection:
su - awsgui
vncserver -kill :1
Now hit insert key. Scroll down and remove ‘#’ from two lines under “Uncomment the following two lines for normal desktop” this. Add “sh” so the line is read.
exec sh /etc/X11/xinit/xinitrc.
Save by “:wq”, and enter.
Then start VNC server again.