finding correct ami id