Implement the script of create AMI.