Deploying a Laravel App via Elastic Beanstalk | Amazon Web Services BASICS

Deploying a Laravel App via Elastic Beanstalk | Amazon Web Services BASICS

Elastic Beanstalk is a great service to get your web application into the web. This video shows how you can easily use it to deploy a Laravel application which even uses a database!

Want to learn AWS Serverless apps? Dive into my complete introduction:

The sample project:
Get Composer (for installing dependencies):
More on .ebextensions:
Dive into the EB CLI:
Elastic Beanstalk Pricing:

Other useful AWS Articles:
– Getting Started:
– Infrastructure:
– Pricing:

Want to become a frontend developer? Consider diving into some of my courses:
Angular vs React vs Vue – Quickstart and Comparison:
Ionic + Angular – The Practical Guide:
Angular – The Complete Guide:
Vue.js – The Complete Guide:

You can follow me on Twitter (@maxedapps), Facebook ( or visit our Website (

See you in the videos!

25 thoughts on “Deploying a Laravel App via Elastic Beanstalk | Amazon Web Services BASICS

  1. Hello, thanks for putting this tutorial up. I have a Lumen app (RESTful API) version 6x, I am trying to deploy this using EBS, the trouble I am facing is that I am only able to access the home route, no other route works. I tried extending the nginx conf by creating a custom conf file inside .platform/nginx/conf.d/custom.conf, in there I added a location directive
    http {
    server {
    location / {
    try_files $uri $uri/ /index.php?$query_string;

    but this always errors out with a message saying "location" directive is not allowed here. I dont know what else to try. Kindly advice, thank you

  2. I didn't have any idea that you (Max) have courses on Laravel !!
    Btw, are there free hosting servers to host my hobby projects?

  3. Hi Max,
    Thank you for simplifying the tutorial. I have a Laravel app with React as frontend. I have followed all the steps you suggested in this tutorial but I still I get 501 error. Can you give a bit idea on that. Thanks

  4. updated database .php
    'mysql' => [

    'driver' => 'mysql',

    'host' => env('RDS_HOSTNAME', ''),

    'port' => env('RDS_PORT', '3306'),

    'database' => env('RDS_DB_NAME', 'forge'),

    'username' => env('RDS_USERNAME', 'forge'),

    'password' => env('RDS_PASSWORD', ''),

    'unix_socket' => env('DB_SOCKET', ''),

    'charset' => 'utf8mb4',

    'collation' => 'utf8mb4_unicode_ci',

    'prefix' => '',

    'strict' => true,

    'engine' => null,


  5. The configuration file .ebextensions/init.config in application version binder-source-2 contains invalid YAML or JSON

    I have try to deployed my app, but the previous error is triggered, my init.config file content is:




    command:"php artisan migrate"

    Could you help me please ?

  6. Hey, great tutorial, but I'm having a problem. When I deploy the app and configure Document root, I get error 404 on the site. How could i fix this?

  7. Thank Max. Awesome Video. Hope you could cover more use cases of errors which might come up while uploading a larger application with more dependencies. Thanks a lot for doing this.

  8. Hello. First I would like to say I love your videos.
    I have followed your instructions but seem to have a problem. My table are not being created. I only get the migrations table. When checking the logs I get this response: Dropped all tables successfully.

    Migration table created successfully.

    Nothing to migrate.
    I currently have 10 migration files witch include the default files. When I run `php artisan migration:fresh` on my local WAMP it works fine. Any riders where I have gone wrong?

Leave a Reply

Your email address will not be published. Required fields are marked *