support an AWS SSO profile as the initial credential source #253
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #251
Why This Is Needed
The publicly released version of botocore does not support using credentials from an AWS SSO profile configure with awscli>=2.0.0.
This means that if the environment variable
AWS_PROFILE
is set to a profile name that was configured with the commandaws configure sso --profile <name>
, anything that uses botocore to load credentials (like boto3) will raiseNoCredentialsError
.This issue is not limited to botocore/boto3, it also effects current releases Serverless Framework and Terraform.
What Changed
Added
botocore.session.Session
that includes the assets required to use AWS SSO profiles as provided in awscli==2.0.0.dev13 (unpublished)Changed
get_session
passes the extendedbotocore.session.Session
session toboto3.Session
so that it can make use of AWS SSO profiles