SBT plugin for working with AWS Code Artifact

SBT AWS Code Artifact

Note: This plugin is in active development and some things are rough. This includes docs, features, and tests :)

This is a plugin for working with AWS CodeArtifact. CodeArtifact is a Maven compatible repository in AWS. It has some rough edges when interoping with sbt, due to sbt's use of ivy.

As of now, this plugin only does one thing. Automatically resolve your credentials.


When working with AWS CodeArtifact it is common to use ephemerial credentials for both publishing and resolution, often timing out in less than 24 hours. This creates a terrible workflow for the developer.

To resolve this, this plugin scans all the configured resolvers. If any of them are CodeArtifact resolvers it will automatically use the AWS CLI to attempt to get new ephemerial credentials. This behavior can be overridden with the setting key awsCodeArtifactAuthTokenForRepoFunction.

Known Issues

  • Publishing to CodeArtifact doesn't work out of the box. CodeArtifact only accepts maven style publishing and it is very strict about the artifact naming. You can use sbt-aether-deploy to deploy non-SNAPSHOT artifacts, but as of 2022-07-22, sbt-aether-deploy's syntax for SNAPSHOTs is rejected by CodeArtifact (I'm not sure who is at fault.).
  • You won't get maven-metadata.xml.