As mentioned here: dap-ps/infra-dapps#22 Elastic Beanstalk is only in V2 version.
According to the https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platforms-retiring.html#platforms-retiring.nodejs the lowest supported version of nodejs is 14.0.0 hence is required to compile discover in nodejs 14 env.