title: MySqlConnection Open() don't open and no error is caught
body: <p>I'm hosting an Aurora MySql instance on AWS and trying to read a table from it on a Lambda function. </p>
  
  <p>This is my connection string:</p>
  
  <pre><code>Server=xxx.xxx.xxx4.xxx; port=3306; database=thedatabase; uid=theuser; pwd=thepassword; Connect Timeout=300
  </code></pre>
  
  <p>This is the code (.Net Core 2.1):</p>
  
  <pre><code>    private static void GetFromDb()
      {
          LambdaLogger.Log($"Function name GetFromDb() has been called.\n");
  
          int counter = 0;
          try
          {
              LambdaLogger.Log($"Using {str}\n");
  
              using (MySqlConnection conn = new MySqlConnection(str))
              {
                  LambdaLogger.Log($"Connection is about to be opened\n");
                  conn.Open();
                  LambdaLogger.Log($"Connection was opened\n");
  
                  var text = "SELECT * FROM MarketPlace.Customers";
  
                  using (MySqlCommand cmd = new MySqlCommand(text, conn))
                  {
                      cmd.CommandTimeout = 360;
                      var reader = cmd.ExecuteReader();
                      LambdaLogger.Log($"Command was issued\n");
  
                      if (reader.HasRows)
                      {
                          LambdaLogger.Log($"reader has rows\n");
  
                          products = new List&lt;Product&gt;();
  
                          while (reader.Read())
                          {
                              counter++;
                              LambdaLogger.Log($"Reading # {counter}\n");
                              Product p = new Product();
                              p.Id = reader.GetInt32(0);
                              p.Name = reader.GetString(1);
                              products.Add(p);
                          }
                      }
                      reader.Close();
                      LambdaLogger.Log($"{counter} items readed");
                  }
              } 
          }
          catch (Exception ex)
          {
              throw new Exception($"[GetFromDb] Error {ex.ToString()}", ex);
          }
      }
  </code></pre>
  
  <p>When try to open the connection, code stops executing, no exception is caught or raised.</p>
  
  <p>Log from CloudWatch:</p>
  
  <blockquote>
    <p>START RequestId: 52225968-d360-4d27-8872-305e4b92e346 Version: $LATEST<br>
    ...<br>
    ...<br>
    Function name GetFromDb() has been called.<br>
    Using Server=xxx.xxx.xxx4.xxx; port=3306; database=thedatabase; uid=theuser; pwd=thepassword; Connect Timeout=300<br>
    Connection is about to be opened<br>
    END RequestId: 52225968-d360-4d27-8872-305e4b92e346<br>
    REPORT RequestId: 52225968-d360-4d27-8872-305e4b92e346    Duration: 30030.17 ms   Billed Duration: 30000 ms   Memory Size: 256 MB Max Memory Used: 107 MB Init Duration: 207.87 ms<br>
    2019-12-12T18:23:58.089Z 52225968-d360-4d27-8872-305e4b92e346 Task timed out after 30.03 seconds<br></p>
  </blockquote>
  
  <p>I'm really stuck here. I don't have any idea of what is happening. Roles, policies, etc. are ok.
  The strange thing is despite connection timeout is set to 300 seconds, it takes less the this to stop running.</p>
  
  <p>Any help would be appreciated. Thanks in advance.</p>