- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2025 12:06 PM
Hi @axelboursin ,
I think this article will help you out: https://docs.databricks.com/aws/en/admin/workspace-settings/default-python-packages (option 1 below).
Recommended approaches (choose based on your environment):
-
For broad, consistent behavior across clusters and notebooks, configure workspace-level default Python package repositories to point to CodeArtifact; this avoids per-notebook tokens and works for both serverless and classic compute.
-
(The thing you mentioned) For classic clusters only, add a cluster-scoped init script that runs
aws codeartifact loginand writes pip config, so pip automatically resolves from your CodeArtifact repo at cluster start. -
For one-off installs or testing, use notebook-scoped %pip with
--index-url(and--extra-index-urlas needed) and credentials pulled from Databricks Secrets inside the notebook.