Closed guilhermeparreira closed 11 months ago
Hi @guilhermeparreira
Thanks for reaching out. I understand you're seeing issues connecting to Redshift using username/password authentication.
I've found some recommendations on approaching this issue on this AWS re:post. There are different options for resolution based on if your Redshift instance is public or private. My guess would be to take a look at how Sagemaker is configured with VPC as an issue may lie there. For the best guidance in securely setting up your VPC + connections between Sagemaker and Redshift I'd recommend to reach our to AWS Support if you have any hesitancy.
closing out due to inactivity. please re-open if you are still experiencing this issue.
Driver version
Redshift version
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.54052
Client Operating System
Python version
3.9.12
Table schema
CREATE TABLE dm_spd.demand_planning_previsao ( date date ENCODE az64, pred bigint ENCODE az64, forecast character varying(256) ENCODE lzo, forecast_collaboration double precision ENCODE raw, market character varying(256) ENCODE lzo, model character varying(256) ENCODE lzo, cycle date ENCODE az64, exog_variables character varying(256) ENCODE lzo, category character varying(256) ENCODE lzo, subgroup character varying(256) ENCODE lzo, solution character varying(256) ENCODE lzo, best_model character varying(256) ENCODE lzo, order_model bigint ENCODE az64, last_load_update timestamp without time zone ENCODE az64 ) DISTSTYLE AUTO;
Problem description
I can connect to
redshift
from my machine orAWS glue
using the following code:However, my code that is in production works a bit differently: I start a
DAG
inAirflow
, that creates aprocessing job
inAmazon Sagemaker
that contains this script.Do you have any clue/best practices to connect
Sagemaker
toredshift
?