Added setup_phase to metadata generation

we need the setup phase to be executed, so the setup-lambda is processed for per-request configuration