boto / botocore

The low-level, core functionality of boto3 and the AWS CLI.
Apache License 2.0
1.47k stars 1.08k forks source link

AWS SSO env provider #2680

Open benkehoe opened 2 years ago

benkehoe commented 2 years ago

Describe the feature

Currently, AWS SSO configuration can only be provided through the ~/.aws/config file directly. aws_sso_lib.get_boto3_session() provides a mechanism for programmatically getting a boto3 session for a given AWS SSO session, but another possibility is to allow it to be defined through environment variables.

Use Case

AWS SSO has a well-defined set of configuration parameters to define AWS access. There should be more ways to use this configuration.

Proposed Solution

Imagine that the following environment variables were supported:

AWS_SSO_START_URL
AWS_SSO_REGION
AWS_SSO_ACCOUNT_ID
AWS_SSO_ROLE_NAME

If all four were defined, the SDK would use those as the credential provider.

Other Information

No response

Acknowledgements

SDK version used

N/A

Environment details (OS name and version, etc.)

N/A

tim-finnigan commented 2 years ago

Thanks @benkehoe for creating these SSO feature requests! I’m going to remove the needs-triage labels since the team is aware of these requests and there has already been some discussion around them. Also we encourage others to 👍 the issue if they want to see that feature request implemented. Please let us know if you have any questions or feedback.