Split AMI functionality to a separate package.