Passing options to custom executor

I am looking to write a custom executor similar to autoscaler, but for AWS. I would like for users to be able to select their own AMIs through their CI configuration. Is my only option to pass environment variables, or does the GitLab Runner API provide a way to pass options from .gitlab-ci.yml to the custom executor?