Repository navigation
Conversation
The Cognito user pool APIs that CognitoSession uses (InitiateAuth and RespondToAuthChallenge) don't use AWS credentials, but creating the boto3 client still loaded them from local AWS configuration. For a profile using console login credentials (`login_session`, from `aws login`), botocore needs the optional awscrt dependency to do that, so `nextstrain login`, `nextstrain whoami`, and nextstrain.org remote commands failed with a MissingDependencyException when awscrt wasn't installed, as in the standalone bundle. Create the client unsigned so no credentials are loaded, as suggested in the issue. Resolves: <#533> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
trvrb
marked this pull request as ready for review
October 23, 2026 22:09
victorlin
approved these changes
Oct 23, 2026
victorlin
left a comment
Member
There was a problem hiding this comment.
Failing tests on windows runners is a known issue outside of this PR.
Will merge+release next week.
Member
Author
|
Thank you @victorlin! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Via Claude
Description of proposed changes
Creates the boto3 Cognito client unsigned, so commands that authenticate with nextstrain.org (
nextstrain login,nextstrain whoami, andnextstrain remotewith nextstrain.org addresses) no longer load AWS credentials. The Cognito user pool APIs we use (InitiateAuth, RespondToAuthChallenge) don't use them.Previously, a local AWS profile using console login credentials (
login_session, fromaws login) made these commands fail with aMissingDependencyExceptionasking forbotocore[crt]. Standalone users can't install that.This is the approach @victorlin suggested in #533, which @joverlee521 agreed with: local AWS credentials shouldn't interfere with
nextstrain login. Addingboto3[crt]is proposed separately in #553. That change would also avoid this error, but with this one, login doesn't depend on the optional dependency or on local AWS credentials at all.One thing this doesn't change: a misspelled
AWS_PROFILEstill fails withProfileNotFound, as on master, because botocore looks up the profile before credentials are involved.Related issues
Resolves #533
Checklist
./devel/pytestlocally; CI pending)nextstrain whoamiwith a[default]profile holding a valid or an expiredaws loginsession fails on master and succeeds on this branchnextstrain remote download https://nextstrain.org/groups/…withAWS_PROFILEset to such a profile succeeds🤖 Generated with Claude Code