9

I just deployed a flask-python app with elastic beanstalk on AWS but cannot locate my app source files like application.py or templates/index.html etc

I've looked at looked at /var/../.. or /opt/../.. etc but nowhere to be found.

Is there an ebs command like $ eb find 'filename.py' etc?

joke4me
  • 812
  • 1
  • 10
  • 29
  • How about `eb ssh` or `eb ssh --command`? See: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-ssh.html – helloV Aug 27 '17 at 13:26
  • I already ssh in and looked at the directories /var/../.. or /opt/../.. etc but don't see any of my application source files – joke4me Aug 27 '17 at 13:51

2 Answers2

11
  • /opt/python – Root of where you application will end up.
  • /opt/python/current/app – The current application that is hosted in the environment.
  • /opt/python/on-deck/app – The app is initially put in on-deck and then, after all the deployment is complete, it will be moved to current. If you are getting failures in yourcontainer_commands, check out out the on-deck folder and not the current folder.
  • /opt/python/current/env – All the env variables that eb will set up for you. If you are trying to reproduce an error, you may first need to source /opt/python/current/env to get things set up as they would be when eb deploy is running.
  • opt/python/run/venv – The virtual env used by your application; you will also need to run source /opt/python/run/venv/bin/activate if you are trying to reproduce an error
dkarchmer
  • 5,434
  • 4
  • 24
  • 37
  • Yes! Thank you. This is exactly the info I was looking for. Not sure if this is well documented anywhere, but it is super helpful. Would upvote 10 times if I could. – ChristopherTull Sep 08 '20 at 01:24
4

As of today, using the default AWS Linux option when creating eb (Python 3.7 running on 64bit Amazon Linux 2/3.1.1), I found the application files in:

/var/app/current

If that doesn't work you can search for a file that you know to be unique in your app, e.g

sudo find / -name hello.html

In my case the above returns /var/app/current/templates/hello.html

brandondavid
  • 201
  • 1
  • 8