import awswrangler as wr
con = wr.redshift.connect("MY_GLUE_CONNECTION")
What would be the value of "MY_GLUE_CONNECTION"?
import awswrangler as wr
con = wr.redshift.connect("MY_GLUE_CONNECTION")
What would be the value of "MY_GLUE_CONNECTION"?
You need to create a Glue connections with unique name in the AWS console first
Let's give it a name test_1
then you can just pass this name to awswrangler
and it will be working without any further steps if you have aws cli installed and authenticated. The trick here is the boto3 auth mechanism used by awswrangler. awswrangler uses boto3 in
awswrangler.redshift.connect()
method with the following note - boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None. So, in fact boto3_session is always used, but by being optional its use might be shadowed from you. With aws cli installed it will check~/.aws/credentials
&&~/.aws/config
and will authenticate based on these files. Another option is to initiate boto3 session in your code and pass it directly to your method.