Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ development source code and as such may not be routinely kept up to date.

# __NEXT__

## Bug fixes

* Commands that authenticate with nextstrain.org, such as `nextstrain login`,
`nextstrain whoami`, and `nextstrain remote` with nextstrain.org addresses,
no longer load AWS credentials, which they don't use. Previously, a local
AWS profile using console login credentials (from `aws login`) caused these
commands to fail with an error about a missing `botocore[crt]` dependency.
([#533](https://github.com/nextstrain/cli/issues/533), [#552](https://github.com/nextstrain/cli/pull/552))

# 11.1.1 (22 October 2026)

Expand Down
9 changes: 9 additions & 0 deletions doc/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ development source code and as such may not be routinely kept up to date.
(v-next)=
## __NEXT__

(v-next-bug-fixes)=
### Bug fixes

* Commands that authenticate with nextstrain.org, such as `nextstrain login`,
`nextstrain whoami`, and `nextstrain remote` with nextstrain.org addresses,
no longer load AWS credentials, which they don't use. Previously, a local
AWS profile using console login credentials (from `aws login`) caused these
commands to fail with an error about a missing `botocore[crt]` dependency.
([#533](https://github.com/nextstrain/cli/issues/533), [#552](https://github.com/nextstrain/cli/pull/552))

(v11-1-1)=
## 11.1.1 (22 October 2026)
Expand Down
12 changes: 11 additions & 1 deletion nextstrain/cli/authn/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import secrets

from base64 import b64encode
from botocore import UNSIGNED
from botocore.config import Config
from errno import EADDRINUSE
from hashlib import sha256
from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler
Expand Down Expand Up @@ -704,7 +706,15 @@ def __init__(self, origin: Origin):
self.user_pool_id = self.client_configuration["aws_cognito_user_pool_id"]
self.user_pool_region = self.user_pool_id.split("_")[0]

self.cognito = boto3.client("cognito-idp", region_name = self.user_pool_region)
# Cognito's user pool auth APIs (InitiateAuth, RespondToAuthChallenge)
# don't use AWS credentials, so don't load any. Loading them can fail
# depending on local AWS configuration, e.g. a profile from `aws login`
# when the optional awscrt dependency isn't installed.
# <https://github.com/nextstrain/cli/issues/533>
self.cognito = boto3.client(
"cognito-idp",
region_name = self.user_pool_region,
config = Config(signature_version = UNSIGNED))

self.can_authenticate_with_password = True

Expand Down
Loading