AWS Glue - An error occurred while calling o95.getDynamicFrame. Communications link failure

0

Hi all,

I'm trying to connect to an external MariaDB database instance using a AWS Glue Spark script and a JDBC Glue connection.

The code snippet from the Spark script is:

dyf = glueContext.create_dynamic_frame.from_options( connection_type = 'mysql', connection_options = { "useConnectionProperties": "true", "connectionName": "sample_con_name", "dbtable": "admins", "customJdbcDriverS3Path": "s3://path_to_connector/mysql-connector-java-8.0.17.jar", "customJdbcDriverClassName": "com.mysql.cj.jdbc.Driver" } )

The error that I'm getting after running the Glue Spark job is: An error occurred while calling o95.getDynamicFrame. Communications link failure

The Glue connection is based on a private subnet in my VPC. The private subnet has a route through a NAT gateway in my VPC and an elastic IP is attached to the NAT gateway - this elastic IP is already whitelisted by the external DB's admins.

Just for testing, I made a EC2 instance on the same private subnet, and wrote a small PHP script to connect to the same external database, and it was connecting successfully.

How do I fix this issue? Is it a driver/certificate issue?

Thanks!

1 Answer
0

Having exact same problem, have you found a solution?

HuyBik
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions