changed ami to amazon linux
add wait