In several Lambda functions and Elastic Beanstalk instances for a project, they all use the same helper functions and constants.
I am trying to follow the DRY method and not hard code these parameters into each Lambda/EB application, but instead have the modules that contain them just import into each Lambda/EB application.
I was ideally hoping to

put all these modules in a separate GitHub repo
create a codepipeline to an S3 bucket
import them into EB/Lambdas wherever needed

I have the first 2 steps done, but can't figure out how to import the modules from S3.
Does anyone have any suggestions on how to do this?
The best way to track changes in code is using a repo but if you need to use an s3 as a repo you can consider enabling versioning in the s3 bucket/repo and define some s3 event source to trigger your pipeline.
For using those dependencies I think it's best to consider using layer for lambda functions or shared EFS volumes in instances for Beanstalk if these dependencies are very important in size.
How to share modules across multiple AWS Lambda and Elastic Beanstalk applications?