'Share source code between Elastic Beanstalk environments

I'm trying to share source code in two EB environments and modules/components seem a perfect way to do this. Modules allow for multiple env configurations in one repo - I just put it in a dedicated folder. Unfortunately it also seems that it forces all the code in the dedicated folder so I'd end up with duplicated code...

Documentation (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebcli-compose.html) says

Each subfolder contains the source code for an independent component of an application that will run in its own environment

Any ideas how to get past this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source