We started using AWS CodeArtifact recently at $work for storing internal maven packages. To pull dependencies from CodeArtifact, we need to use an authentication token that expires in 12 hours by default.
Everytime the token expires, we need to obtain a new temporary token and update the maven settings file,
~/.m2/settings.xml. This gets annoying pretty fast.
Thankfully, there's an IntelliJ IDEA plugin, helpfully called "AWS CodeArtifact + Maven" accepts your maven configuration and uses your AWS Credentials to refresh the token.
After adding your maven configuration, you can refresh your token anytime using
Tools > Generate AWS CodeArtifact Credentials for Maven from the menu.
This handy plugin has definitely made using CodeArtifact for maven projects much more bearable! Give it a try.