title: hosting a laravel application in aws elastic beanstalk with rds db instance
body: <p>I have successfully completed deploying my application on elastic beanstalk. But when I call the URL it shows (I have exported my table to RDS DB instance)</p>
  
  <blockquote>
    <p>ErrorException in Connector.php line 47:
    SQLSTATE[HY000] [2002] Connection timed out (View: /var/app/current/local/resources/views/themes/default1/client/cart.blade.php)</p>
  </blockquote>
  
  <p>My database.php configuration is:</p>
  
  <pre><code>'mysql' =&gt; [
          'driver'    =&gt; 'mysql',
          'host'      =&gt; 'rds.cvp31y7ebg1x.us-west-2.rds.amazonaws.com:3306',
          'database'  =&gt; 'rdsdb',
          'username'  =&gt;'rdsuser',
          'password'  =&gt; '******',
          'charset'   =&gt; 'utf8',
          'collation' =&gt; 'utf8_unicode_ci',
          'prefix'    =&gt; '',
          'strict'    =&gt; false,
      ],
  </code></pre>
  
  <p>Please help me to figure out this problem.</p>
  
  <p>Thanks.</p>