Hi, @gazpachu. I don’t know of any reason that it would be possible to use AWS CodeArtifact during Netlify’s builds. I also don’t know of anyone else doing this before though so I don’t have prior art to explain how to do so. We’d be happy to troubleshoot with you though.
Looking at the error above, it is about directory permissions for /usr/local:
Looking at the AWS CLI documentation, it looks like you can override the install directory with -i to overcome this error:
Installs the AWS CLI v2
USAGE:
install [FLAGS] [OPTIONS]
FLAGS:
-u, --update Updates the AWS CLI v2 if a different version
is previously installed. By default, this script
will not update the AWS CLI if a previous
installation is detected.
-h, --help Prints help information
OPTIONS:
-i, --install-dir <path> The directory to install the AWS CLI v2. By
default, this directory is: /usr/local/aws-cli
-b, --bin-dir <path> The directory to store symlinks to executables
for the AWS CLI v2. By default, the directory
used is: /usr/local/bin
Note, this may mean that your npm run co:login script will need to be modified to point to the new installation directory or that you will need to export the new directory in the PATH environment variable like so: