71

From an architecture perspective I'm trying to get a better understand of how and where files deployed to eb (t2) server are stored.

I see some .zip files in s3 that show when I upload something via the eb interface, though how/where exactly does this get end up on my ec2(t2) server?

Justin
  • 2,372
  • 2
  • 21
  • 35

3 Answers3

150

It's in the /tmp/deployment/application folder during deployment and the moved to /var/app/current afterward.

In case you search them, the node logs are in /var/log/nodejs/nodejs.log and the application will bind to 8081 no matter what PORT environment variable you set in the Environment Variables in the console.

Manuel Darveau
  • 4,175
  • 3
  • 23
  • 35
  • 1
    I am using eb deploy every time to upload my changes to server file code. Can I directly make changes to /var/app/current directory. – vgokul129 Jul 18 '17 at 11:45
  • That's against the best practices @vgokul129. If you have to log on to server to make changes then you are not really using eb for streamlined deployment. Also, eb can create multiple instances with load balancer, so changing something in one instance will not change it on all instances. – kwalski Feb 04 '18 at 08:13
  • 2
    This directory location should really be in the AWS documentation, as far as I'm aware I haven't found it anywhere. – Countach Feb 08 '19 at 05:07
  • 1
    @XanT - I just found it here under "volumes" https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker_v2config.html#create_deploy_docker_v2config_dockerrun – Chad Mar 13 '19 at 16:29
4

The top answer seems to be still working in November of 2020 for node app (nuxt app in my case)

/var/app/current
Arlan T
  • 2,421
  • 1
  • 13
  • 10
3

/var/app/current may be outdated. It doesn't exist on my instance.
As said there I can't find my Web app when I SSH to my AWS Elastic Beanstalk instance, for python the app is in /opt/python/bundle/2/app/
Otherwise use find to search for the location (look at the link).

M. Riché
  • 116
  • 1
  • 6