You should be able to do it by the following:
set the registryUrls in your renovate.json's packageRules, as explained here: https://docs.renovatebot.com/configuration-options/#registryurls. Also see this for finding out the repo URL for CodeArtifact: https://docs.aws.amazon.com/codeartifact/latest/ug/npm-auth.html#configuring-npm-without-using-the-login-command
keep the aws codeartifact login inside the pipeline
copy the renovate.json file from the repo directory to a temporary location
embed the .npmrc inside the temporary renovate.json, perhaps using a tool like jq
set the RENOVATE_CONFIG_FILE environment variable to point to the temporary renovate.json