RebDev
RebDev

Reputation: 335

Where does AWS Elastic Beanstalk store application files?

I've spent the day reading up on AWS Elastic Beanstalk but as an AWS newbie there are still a few issues that I'm not clear on. As far as I can tell it would allow my PHP application to scale based on rules that I've set. I could have my database data stored on an Amazon RDS instance and my media storage on an Amazon S3 instance. As the site gained more traffic the system would add on new Amazon EC2 instances which would increase the compute capacity. But where are the PHP application files stored?

Upvotes: 2

Views: 1974

Answers (2)

Adem Tepe
Adem Tepe

Reputation: 768

When I first tried to deploy a Laravel application to Elastic Beanstalk, I wanted to run php artisan storage:link command. It worked but I realized that it created the symlink under /var/app/staging directory.

And that's when I discovered that the application files exist under /staging and /current directories of /var/app.

Actually, I was expecting them to be under /var/www/html which is straightforward. But wait, they are there too!

So, I was confused, I read through EB documentation and I couldn't find an explanation about this.

I'm still looking for this information but as far as I understand there are application deployment phases and EB is creating two directories accordingly: /staging and /current.

So the live one must be /current. My guess is /var/www/html is the first place EB is putting the source code into. Maybe the last place, I'll see...

Upvotes: 1

yegor256
yegor256

Reputation: 105063

You upload them in ZIP format to an S3 bucket and Elastic Beanstalk takes them from there.

Upvotes: 2

Related Questions