According to this AWS Documentation, we can understand that whenever you try to connect to Redshift programmatically then it will inherently make use of the endpoint depending upon your region.
Please do ensure that a connection is attached to your Glue job such that it is able to reach the endpoint. You can add a network connection to your Glue job mentioning the VPC and subnet. Please do ensure that the Glue job has access to reach the redshift endpoint through the subnet mentioned. Please do attach a private subnet with NAT gateway to the Glue job.
Make sure that security group attached to Glue job has a self referencing inbound rule.
Make sure that the security group of redshift cluster is allowing inbound traffic from the security group of Glue job. If it is not, then add an inbound rule to the redshift cluster's security group.
Please refer this article for more details.
glue version 3.0 for python shellasked 4 months ago
get_connection timeout in AWG Glue jobasked 14 hours ago
Using External Python Packages on AWS Glue.asked 9 months ago
AWS Glue says it supports python 3.7 for AWS Glue 2.0 but in reality, only python 3.6 for Python Shell ELTasked 2 months ago
Using boto3 client redshift-data APIs in AWS Glue python shell job gives ConnectTimeoutError errorasked 2 months ago
Intermittent ConnectTimeoutError accessing SSMasked 2 months ago
AWS Glue python shell job is supporting only python 3.6, but boto3 is now stopping its support to python 3.6
Can't install pyarrow on AWS Glue python shellasked 3 years ago
How to retrieve job run id from the script itself in python shell glue job
Error while try to connect to DB using jdbcasked 2 months ago