Skip to content

Why does glue give an invalid connection string error even with a valid documentdb connection string?

0

I keep getting this error, Error Category: UNCLASSIFIED_ERROR; An error occurred while calling o106.getDynamicFrame. Invalid connection string

But the connection string looks fine, looks identical to the string used when my application connects to the same documentDB cluster

mongodb://myusername:mypassword@my-cluster-name-1234567890.us-west-2.docdb-elastic.amazonaws.com:27017/Chimera/?ssl=true

asked 2 years ago935 views

1 Answer
0

Hello,

The shared error "Error Category: UNCLASSIFIED_ERROR; An error occurred while calling o106.getDynamicFrame. Invalid connection string" generally occurs when the connection string used for connectivity from Glue is not valid.

I checked the documentation and could see that the expected uri for the DocumentDB is as below:

mongodb://host:port/databasename

Please note that this does not include your username or password in the URL. 

[+]Amazon DocumentDB connections: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-connect-documentdb-home.html

I would kindly request you to update your URI as required and provide the username and password in the separate username and password fields accordingly which you can find below while creating the connection. Alternatively you can also use Secrets manager to store your credentials and then use that in your connection. Please refer [1] for steps on the same.

Also, if you want to run a glue job, you can refer [2] for providing the connection details directly from the job script and that would not require you to create a connection.

References:

[1] https://aws.amazon.com/blogs/big-data/building-aws-glue-spark-etl-jobs-using-amazon-documentdb-with-mongodb-compatibility-and-mongodb/

[2] https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-connect-documentdb-home.html

AWS
SUPPORT ENGINEER

answered 2 years ago

EXPERT

reviewed 2 years 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.

Relevant content