Replies: 29 comments 5 replies
-
Hey Dmitriy, thanks for reaching out. AFAIK we should be picking up this role when we establish a boto client for redshift.Could you please share the redshift_connector log so I can look into this more? |
Beta Was this translation helpful? Give feedback.
-
How can I get redshift_connector log from my Glue job? |
Beta Was this translation helpful? Give feedback.
-
@Brooke-white |
Beta Was this translation helpful? Give feedback.
-
Hey @dburtsev , Apologies for the delayed response, I appreciate you for following up on this. You can enable logging using the instructions here in README. While this may not apply to your use case's permissions, is redshift_connector able to connect without the role present? I ask just as this is a measure to assure the credentials are being picked up from your Glue runtime environment. Aside from that, I'd recommend to follow the instructions here to place the name of your role in an |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
What differs in the previous version of this script? Dependency versions? Script logic?
You can override the location of the config file and create your own, but given the above note we should probably dig into what changed between the two versions of the script. |
Beta Was this translation helpful? Give feedback.
-
The previous version of the script was running on EC2 instance with an empty /aws/config file and the Role attached to EC2. |
Beta Was this translation helpful? Give feedback.
-
Ok thank you for clarifying. I notice you are using an old version of redshift_connector. Could you please update to latest version? I ask because in a newer version than what you're using we fixed #15 which I believe is what you're hitting. |
Beta Was this translation helpful? Give feedback.
-
I upgrade to redshift_connector-2.0.908-py3-none-any.whl |
Beta Was this translation helpful? Give feedback.
-
It may be an issue with Role. |
Beta Was this translation helpful? Give feedback.
-
I guess the Glue job needs VPC |
Beta Was this translation helpful? Give feedback.
-
Could you enable logging or share more of the error trace so I can try and understand where this error is hit? |
Beta Was this translation helpful? Give feedback.
-
22/08/10 17:12:45 ERROR ProcessLauncher: Error from Python:Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
Beta Was this translation helpful? Give feedback.
-
how are you bringing redshift_connector into glue environment? also please enable redshift_connector logging
|
Beta Was this translation helpful? Give feedback.
-
this looks like some path issue reading in redshift cert
|
Beta Was this translation helpful? Give feedback.
-
22/08/10 17:12:45 ERROR GlueExceptionAnalysisListener: [Glue Exception Analysis] { |
Beta Was this translation helpful? Give feedback.
-
Each Glue job can use external Python libraries. I download scramp-1.4.1-py3-none-any.whl, asn1crypto-1.5.1-py2.py3-none-any.whl and redshift_connector-2.0.908-py3-none-any.whl into s3 bucket. Glue job has property: Libraries |
Beta Was this translation helpful? Give feedback.
-
I can connect when I use the user name and password. |
Beta Was this translation helpful? Give feedback.
-
@dburtsev please look to this response I've given in past that shows code snippit for enable logging. |
Beta Was this translation helpful? Give feedback.
-
thank you :)
I've picked out a few lines from the log you posted (I went ahead and deleted the log since some sensitive information is being logged by boto) but my main take away here is
Unless you are manually setting connection parameter Could you please confirm that you can connect to Redshift with |
Beta Was this translation helpful? Give feedback.
-
Yes, I did.
No, I can't. InterfaceError: ('communication error', NotADirectoryError(20, 'Not a directory')) |
Beta Was this translation helpful? Give feedback.
-
Do you need log? |
Beta Was this translation helpful? Give feedback.
-
Ok, seeing you had SSL disabled when using user/password provides some context here. The issue at hand has to do with SSL, as when SSL is enabled we read the Is the cert present there? |
Beta Was this translation helpful? Give feedback.
-
also, wondering if |
Beta Was this translation helpful? Give feedback.
-
There is no certificate. I download only *.whl files. Where should I get the certificate file? |
Beta Was this translation helpful? Give feedback.
-
No, it is a file. |
Beta Was this translation helpful? Give feedback.
-
Ok I see. You mention you set this Glue Job property "Libraries" and pass S3 URIs for mentioned packages. I'm not seeing this parameter in the docs: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-glue-arguments.html could you clarify which parameter is used? |
Beta Was this translation helpful? Give feedback.
-
I ask because I'm seeing another parameter recommended here: https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-libraries.html#addl-python-modules-support |
Beta Was this translation helpful? Give feedback.
-
If you're not doing so already, I'd recommend to try using this |
Beta Was this translation helpful? Give feedback.
-
Hello
I have a Glue job with an attached Role (arn:aws:iam:...:role/...). I can connect to Redshift with boto3.client('redshift-data')
I can get an attached role name in runtime.
Is it possible to connect to Redshift using redshift_connector with Role?
InterfaceError: Invalid connection property setting. Credentials provider, AWS credentials, Redshift auth profile or AWS profile must be provided when IAM is enabled
redshift_connector-2.0.886
Thanks,
Dmitriy
Beta Was this translation helpful? Give feedback.
All reactions