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!

43 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', '127.0.0.1'),

    '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:

    .ebextensions/init.config
    ->

    container_commands:

    01initdb:

    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?

  9. Great and very detailed explanation! Huge thank you! You are one of the best coding instructors out there!

  10. i am getting the follow error can anyone help me
    "commands" in configuration file .ebextensions/init.config in application version mathstutorhelp-source-1 must be a map. Update "commands" in the configuration file.

  11. Hi Max, how do I implement DevOp with ElasticBean?

    We intend to public features daily. Any advice here?

  12. Hi Max, I want to ask if there's this ability to just upload a .sql file into elastic beanstalk without using migrations since my migrations file has so many issues in it when I migrate tables with it. :'( I need some answers 🙂

  13. hello,

    I followed all your instructions but when I add / public the health status of my elastic beanstalk goes to degraded and the laravel application is not displayed. What to do?

  14. Sir I have Copied the same steps you have mentioned in Video. Sir Everything is Fine But As You have faced the problem at the end of video i.e. Failed To Deploy application and you solved it using MAC TERMINAL. I am Working on Windows So I am Getting same issue sir what command will help me to solve this problem

  15. Max thank you so much for making this video! Without you, my team and I could not have deployed our final project to AWS. You are great man!

  16. Hello Max. Nice tutorial, thank you!! I have a doubt, do you recommend to use codecommit to deploy laravel proyects ?? Thanks!!

Leave a Reply

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