title: How to hook up AWS RDS - Aurora with AWS Lambda Java function
body: <p>I am trying to hook up AWS RDS Aurora database with AWS Lambda Java function. For this, I am yet to see any concrete examples. I have seen some examples but they are non java. </p>
  
  <p>I would also like to configure a mySQL DBMS tool with Aurora which I am not able to do :( Can someone help me with that as well. I have got the connection strings from <a href="https://console.aws.amazon.com/rds/home?region=us-east-1#dbinstances" rel="nofollow noreferrer">https://console.aws.amazon.com/rds/home?region=us-east-1#dbinstances</a>. </p>
  
  <p>Also, the code I am trying to connect to DB via Lambda Java is:</p>
  
  <pre><code>private Statement createConnection(Context context) {
      logger = context.getLogger();
      try {
          String url = "jdbc:mysql://HOSTNAME:3306";
          String username = "USERNAME";
          String password = "PASSWORD";
  
          Connection conn = DriverManager.getConnection(url, username, password);
          return conn.createStatement();
      } catch (Exception e) {
          e.printStackTrace();
          logger.log("Caught exception: " + e.getMessage());
      }
      return null;
  }
  </code></pre>
  
  <p>And yes, this doesn't help as I always get null using the db instance config. </p>
  
  <p><a href="https://i.stack.imgur.com/6QWxM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6QWxM.png" alt="Security groups added to db isntance"></a></p>