Describe the bug
I have tried various forms of the NPM scope in the namespace argument but all fail with this message:
Invalid scope name, scope must contain URL-safe characters, no leading dots or underscores
Where I have tried Namespace, @Namespace, "Namespace", "@Namespace"
aws-cli/2.33.2 Python/3.13.12 Linux/6.18.20 source/x86_64.nixos.26
Regression Issue
It seems likely since I've seen other issues in my search for info on this one where it seems as though people were using --namespace just fine
Expected Behavior
Command works and uses the --namespace as the scope option in npmrc
Current Behavior
Invalid scope name, scope must contain URL-safe characters, no leading dots or underscores
Reproduction Steps
aws --profile codeartifact codeartifact login --tool npm --repository my-registry --domain my-domain --domain-owner <ACCOUNT-ID-REDACTED> --region us-east-1 --namespace Namespace
Possible Solution
It looks like this is just a simple fix in the regex match on the namespace, which currently disallows uppercase characters for NPM, but uppercase characters are valid scopes in NPM, and they are not case insensitive: using --namespace namespace instead of --namespace Namespace makes the CLI command run but then npm install @{N,n}amespace/package fails to resolve until you edit the .npmrc to make the scope be Namespace. I opened #10208 to fix this.
Additional Information/Context
No response
CLI version used
aws-cli/2.33.2 Python/3.13.12 Linux/6.18.20 source/x86_64.nixos.26
Environment details (OS name and version, etc.)
NixOS 26.05
Describe the bug
I have tried various forms of the NPM scope in the namespace argument but all fail with this message:
Invalid scope name, scope must contain URL-safe characters, no leading dots or underscoresWhere I have tried
Namespace,@Namespace,"Namespace","@Namespace"aws-cli/2.33.2 Python/3.13.12 Linux/6.18.20 source/x86_64.nixos.26
Regression Issue
It seems likely since I've seen other issues in my search for info on this one where it seems as though people were using
--namespacejust fineExpected Behavior
Command works and uses the
--namespaceas the scope option in npmrcCurrent Behavior
Invalid scope name, scope must contain URL-safe characters, no leading dots or underscoresReproduction Steps
aws --profile codeartifact codeartifact login --tool npm --repository my-registry --domain my-domain --domain-owner <ACCOUNT-ID-REDACTED> --region us-east-1 --namespace NamespacePossible Solution
It looks like this is just a simple fix in the regex match on the namespace, which currently disallows uppercase characters for NPM, but uppercase characters are valid scopes in NPM, and they are not case insensitive: using
--namespace namespaceinstead of--namespace Namespacemakes the CLI command run but thennpm install @{N,n}amespace/packagefails to resolve until you edit the.npmrcto make the scope beNamespace. I opened #10208 to fix this.Additional Information/Context
No response
CLI version used
aws-cli/2.33.2 Python/3.13.12 Linux/6.18.20 source/x86_64.nixos.26
Environment details (OS name and version, etc.)
NixOS 26.05