AWS CodeArtifact Authentication Failing for NPM Packages
Configuration:
Set these environment variables on all workers:
EPHEMERAL_TOKEN_CMD="aws codeartifact get-authorization-token --region <region> --domain <insert domain> --query authorizationToken --output text --duration-seconds 900"
NPM_CONFIG_REGISTRY="https://<domain>-<account>.d.codeartifact.<region>.amazonaws.com/npm/<repository>/:_authToken=EPHEMERAL_TOKEN"
Issue:
Token command works correctly when executed directly in shell on worker
IAM policies verified and working
Importing NPM packages in scripts fails with 401 Unauthorized error
Question:
Is there a missing configuration step or workaround needed for NPM packages?