Skip to content

Commit 85b975a

Browse files
committed
Add user guide for SSO provider usage
1 parent 1b1065c commit 85b975a

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

‎docs/source/guide/credentials.rst‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,38 @@ This provider can also be configured via environment variables:
232232

233233
These environment variables currently only apply to the assume role with web identity provider and do not apply to the general assume role provider configuration.
234234

235+
AWS Single Sign-On Provider (SSO)
236+
-----------------------------------
237+
238+
Support for the AWS Single Sign-On (SSO) credential provider was added in 1.14.0.
239+
240+
To begin using the SSO credential provider, start by using the AWS CLI V2 to configure and manage your SSO profiles and login sessions.
241+
For detailed instructions on the configuration and login process see the `AWS CLI User Guide for SSO <https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html>`_.
242+
Once completed you will have one or many profiles in the shared configuration file with the following settings:
243+
244+
.. code-block:: ini
245+
246+
# In ~/.aws/config
247+
[profile my-sso-profile]
248+
sso_start_url = https://my-sso-portal.awsapps.com/start
249+
sso_region = us-east-1
250+
sso_account_id = 123456789011
251+
sso_role_name = readOnly
252+
253+
* ``sso_start_url`` - The URL that points to the organization's AWS SSO user portal.
254+
* ``sso_region`` - The AWS Region that contains the AWS SSO portal host. This is separate from, and can be a different region than the default CLI region parameter.
255+
* ``sso_account_id`` - The AWS account ID that contains the IAM role that you want to use with this profile.
256+
* ``sso_role_name`` - The name of the IAM role that defines the user's permissions when using this profile.
257+
258+
You can then specify the profile name via the ``AWS_PROFILE`` environment variable or the ``profile_name`` argument when creating a ``Session``.
259+
For example, we can create a Session using the ``my-sso-profile`` profile and any clients created from this session will use the ``my-sso-profile`` credentials:
260+
261+
.. code-block:: python
262+
263+
import boto3
264+
265+
session = boto3.Session(profile_name='my-sso-profile')
266+
s3_client = session.client('s3')
235267
236268
Boto 2 config
237269
---------------

0 commit comments

Comments
 (0)