AWS aurora-dsql documentation change
Summary
Updated connection instructions to include SSL certificate download and changed from Psycopg2 to Psycopg driver
Security assessment
The addition of AmazonRootCA1.pem certificate download improves security documentation by enforcing SSL/TLS validation. The driver change (psycopg2 → psycopg) aligns with modern security practices but doesn't indicate a vulnerability fix. These are security best practice enhancements rather than responses to specific vulnerabilities.
Diff
diff --git a/aurora-dsql/latest/userguide/SECTION_program-with-jupyter.md b/aurora-dsql/latest/userguide/SECTION_program-with-jupyter.md index b3836241c..1cbe8d393 100644 --- a//aurora-dsql/latest/userguide/SECTION_program-with-jupyter.md +++ b//aurora-dsql/latest/userguide/SECTION_program-with-jupyter.md @@ -49 +49 @@ Once the SageMaker instance becomes active, you can open it from the **Notebook -After you have set up a JupyterLab instance, the steps to connect to Aurora DSQL are the same locally and in SageMaker AI. Create a notebook using the new file button on the left, then select Python 3 under Notebook. From here you will now have an empty notebook, in which you can add cells with Python code. +After you have set up a JupyterLab instance, the steps to connect to Aurora DSQL are the same locally and in SageMaker AI. Create an empty Python 3 notebook, in which you can add cells with Python code. @@ -51 +51 @@ After you have set up a JupyterLab instance, the steps to connect to Aurora DSQL -To connect to Aurora DSQL, first install the [Aurora DSQL Connector for Python](https://github.com/awslabs/aurora-dsql-python-connector) and the Psycopg2 driver in a Python cell, and then import it: +In a Python cell, download the Amazon root certificate from the official trust store: @@ -54 +54,2 @@ To connect to Aurora DSQL, first install the [Aurora DSQL Connector for Python]( - pip install aurora_dsql_python_connector psycopg2 + import urllib.request + urllib.request.urlretrieve('https://www.amazontrust.com/repository/AmazonRootCA1.pem', 'root.pem') @@ -57 +58,7 @@ To connect to Aurora DSQL, first install the [Aurora DSQL Connector for Python]( - import aurora_dsql_psycopg2 as dsql +To connect to Aurora DSQL, first install the [Aurora DSQL Connector for Python](https://github.com/awslabs/aurora-dsql-python-connector) and the Psycopg driver in a Python cell, and then import it: + + + pip install aurora_dsql_python_connector psycopg + + + import aurora_dsql_psycopg as dsql @@ -70 +77 @@ With the connector imported, you can then create a DSQL configuration and connec -Upon running your code you should now have a Psycopg2 connection to Aurora DSQL. You can then run queries using the Psycopg2 cursor and providing your SQL query. See the [Psycopg2 documentation](https://www.psycopg.org/docs/index.html) for more information on using Psycopg2 with a Postgres-compatible database. This query will result in a list of tuples in `results_list`. +Upon running your code you should now have a Psycopg connection to Aurora DSQL. You can then run queries using the Psycopg cursor and providing your SQL query. See the [Psycopg documentation](https://www.psycopg.org/psycopg3/docs/) for more information on using Psycopg with a Postgres-compatible database. This query will result in a list of tuples in `results_list`.