alllex229A
Windmill3mo ago
6 replies
alllex229

AWS CodeArtifact Authentication Failing for NPM Packages

According to https://github.com/windmill-labs/windmill/discussions/5873, AWS CodeArtifact works for Python packages. I'm trying to configure the same for NPM packages but encountering authentication issues.

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?
GitHub
Hi there! We have recently upgraded to Enterprise, but it's not clear how to set up access to CodeArtifact and ensure we keep the relevant token refreshed. Where are the docs etc on that?
Using AWS CodeArtifact for packages · windmill-labs windmill · Di...
Was this page helpful?