I believe you have two options to handle situations where new EC2 instances are being created automatically for you:
- Either create a custom AMI for your EC2 instances, or
- Customize your AWS EB environment.
Amazon issues a notice about using custom AMI:s:
"After you are running on your own custom AMI, you will no longer receive any
automated updates to the operating system, software stack, or the AWS Elastic
Beanstalk host manager."
Personally, I've stuck to using configuration files. Takes a bit of tinkering, but once I got it working it operates pretty well.
Good luck!