title: AWS GLUE - SQL server SSL encryption error
body: <p>Im trying to upload data from SQL Server which is in a EC2 instance to RedShift using AWS Glue. </p>
  
  <p>I have created the Connections and Crawlers and its working fine. </p>
  
  <p>Then I created a Job to load the data I got the below error. </p>
  
  <blockquote>
    <p>The driver could not establish a secure connection to SQL Server by
    using Secure Sockets Layer (SSL) encryption. Error:
    "sun.security.validator.ValidatorException: PKIX path building failed:
    sun.security.provider.certpath.SunCertPathBuilderException: unable to
    find valid certification path to requested target".</p>
  </blockquote>
  
  <p>Logs:</p>
  
  <pre><code>raceback (most recent call last):
  File "script_2017-10-24-06-24-48.py", line 20, in &lt;module&gt;
  datasource0 = glueContext.create_dynamic_frame.from_catalog(database = "XXX", table_name = "XXXXXXX", transformation_ctx = "datasource0")
  File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/PyGlue.zip/awsglue/dynamicframe.py", line 508, in from_catalog
  File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/PyGlue.zip/awsglue/context.py", line 120, in create_dynamic_frame_from_catalog
  File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/PyGlue.zip/awsglue/data_source.py", line 36, in getFrame
  File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/py4j-0.10.4-src.zip/py4j/java_gateway.py", line 1133, in __call__
  File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/pyspark.zip/pyspark/sql/utils.py", line 63, in deco
  File "/mnt/yarn/usercache/root/appcache/application_1508826088545_0001/container_1508826088545_0001_02_000001/py4j-0.10.4-src.zip/py4j/protocol.py", line 319, in get_return_value
  py4j.protocol.Py4JJavaError: An error occurred while calling o59.getDynamicFrame.
  : com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:1ee3a8e5-a3a1-4871-a94c-28907c04acef
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2392)
  at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1777)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1969)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1616)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1447)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:788)
  at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1187)
  at com.amazonaws.services.glue.util.JDBCWrapper$$anonfun$getRawConnection$1.apply(JDBCUtils.scala:535)
  at com.amazonaws.services.glue.util.JDBCWrapper$$anonfun$getRawConnection$1.apply(JDBCUtils.scala:535)
  at com.amazonaws.services.glue.util.JDBCWrapper.catchSSLException(JDBCUtils.scala:514)
  at com.amazonaws.services.glue.util.JDBCWrapper.getRawConnection(JDBCUtils.scala:535)
  at com.amazonaws.services.glue.JDBCDataSource.getPrimaryKeys(DataSource.scala:392)
  at com.amazonaws.services.glue.JDBCDataSource.getDynamicFrame(DataSource.scala:354)
  at com.amazonaws.services.glue.DataSource$class.getDynamicFrame(DataSource.scala:45)
  at com.amazonaws.services.glue.SparkSQLDataSource.getDynamicFrame(DataSource.scala:317)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
  at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
  </code></pre>