You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/overview.rst
+27-7Lines changed: 27 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -185,7 +185,7 @@ Here is an example:
185
185
186
186
Use Scripts Stored in a Git Repository
187
187
--------------------------------------
188
-
When you create an estimator, you can specify a training script that is stored in a GitHub or other Git repository as the entry point for the estimator, so that you don't have to download the scripts locally.
188
+
When you create an estimator, you can specify a training script that is stored in a GitHub (or other Git) or CodeCommit repository as the entry point for the estimator, so that you don't have to download the scripts locally.
189
189
If you do so, source directory and dependencies should be in the same repo if they are needed. Git support can be enabled simply by providing ``git_config`` parameter
190
190
when creating an ``Estimator`` object. If Git support is enabled, then ``entry_point``, ``source_dir`` and ``dependencies``
191
191
should be relative paths in the Git repo if provided.
@@ -195,19 +195,26 @@ The ``git_config`` parameter includes fields ``repo``, ``branch``, ``commit``,
195
195
repository where your training script is stored. If you don't provide ``branch``, the default value 'master' is used.
196
196
If you don't provide ``commit``, the latest commit in the specified branch is used.
197
197
198
-
``2FA_enabled``, ``username``, ``password`` and ``token`` are used for authentication. Set ``2FA_enabled`` to 'True' if
199
-
two-factor authentication is enabled for the GitHub (or other Git) account, otherwise set it to 'False'.
200
-
If you do not provide a value for ``2FA_enabled``, a default value of 'False' is used.
198
+
``2FA_enabled``, ``username``, ``password`` and ``token`` are used for authentication. For GitHub
199
+
(or other Git) accounts, set ``2FA_enabled`` to 'True' if two-factor authentication is enabled for the
200
+
account, otherwise set it to 'False'. If you do not provide a value for ``2FA_enabled``, a default
201
+
value of 'False' is used. CodeCommit does not support two-factor authentication, so do not provide
202
+
"2FA_enabled" with CodeCommit repositories.
201
203
204
+
For GitHub or other Git repositories,
202
205
If ``repo`` is an SSH URL, you should either have no passphrase for the SSH key pairs, or have the ``ssh-agent`` configured
203
206
so that you are not prompted for the SSH passphrase when you run a ``git clone`` command with SSH URLs. For SSH URLs, it
204
-
does not matter whether two-factor authentication is enabled.
205
-
206
-
If ``repo`` is an https URL, 2FA matters. When 2FA is disabled, either ``token`` or ``username``+``password`` will be
207
+
does not matter whether two-factor authentication is enabled. If ``repo`` is an HTTPS URL, 2FA matters. When 2FA is disabled, either ``token`` or ``username``+``password`` will be
207
208
used for authentication if provided (``token`` prioritized). When 2FA is enabled, only token will be used for
208
209
authentication if provided. If required authentication info is not provided, python SDK will try to use local
209
210
credentials storage to authenticate. If that fails either, an error message will be thrown.
210
211
212
+
For CodeCommit repos, please make sure you have completed the authentication setup: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up.html.
213
+
2FA is not supported by CodeCommit, so ``2FA_enabled`` should not be provided. There is no token in CodeCommit, so
214
+
``token`` should not be provided either. If ``repo`` is an SSH URL, the requirements are the same as GitHub repos.
215
+
If ``repo`` is an HTTPS URL, ``username``+``password`` will be used for authentication if they are provided; otherwise,
216
+
Python SDK will try to use either CodeCommit credential helper or local credential storage for authentication.
217
+
211
218
Here are some examples of creating estimators with Git support:
212
219
213
220
.. code:: python
@@ -276,6 +283,19 @@ Here are some examples of creating estimators with Git support:
276
283
train_instance_count=1,
277
284
train_instance_type='local')
278
285
286
+
.. code:: python
287
+
288
+
# This example specifies a CodeCommit repository, and try to authenticate with provided username+password
0 commit comments