Optional[str] = None, secret_id: Optional[str] = None, catalog_id: Optional[str] = None, dbname: Optional[str] = None, boto3_session: Optional[Session] = None, call_timeout: Optional[int] = 0) Any

Return a oracledb connection from a Glue Catalog Connection.


You MUST pass a connection OR secret_id. Here is an example of the secret structure in Secrets Manager: { “host”:””, “username”:”test”, “password”:”test”, “engine”:”oracle”, “port”:”1521”, “dbname”: “mydb” # Optional }

  • connection (Optional[str]) – Glue Catalog Connection name.

  • secret_id (Optional[str]:) – Specifies the secret containing the connection details that you want to retrieve. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.

  • catalog_id (str, optional) – The ID of the Data Catalog. If none is provided, the AWS account ID is used by default.

  • dbname (Optional[str]) – Optional database name to overwrite the stored one.

  • boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session receive None.

  • call_timeout (Optional[int]) – This is the time in milliseconds that a single round-trip to the database may take before a timeout will occur. The default is None which means no timeout. This parameter is forwarded to oracledb.


oracledb connection.

Return type



>>> import awswrangler as wr
>>> with con.cursor() as cursor:
>>>     cursor.execute("SELECT 1 FROM DUAL")
>>>     print(cursor.fetchall())
>>> con.close()