dbt-labs/dbt-core · error · anyhow
codeartifact returned no authorization token
Error message
codeartifact returned no authorization token
What it means
The AWS CodeArtifact get_authorization_token call returned a response without an authorizationToken field, so the 900-second session token needed for the upload is missing. The HTTP call itself succeeded with context attached, so this is typically transient (service/ throttling) or an IAM/profile misconfiguration rather than malformed input.
Solutions
- Retry the publish — token fetching is short-lived and can fail transiently
- Verify the configured profile has codeartifact:GetAuthorizationToken permission on the domain
- Check domain/domain-owner/region combination is correct
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/dbt-ci/src/publish.rs:311 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/280ac4e1dc45b8fe.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-ci/src/publish.rs:311
target.domain, target.region, target.profile,
);
let region = aws_config::Region::new(target.region.clone());
let conf = aws_config::defaults(aws_config::BehaviorVersion::latest())
.region(region)
.profile_name(&target.profile)
.load()
.await;
let client = aws_sdk_codeartifact::Client::new(&conf);
let token = client
.get_authorization_token()
.domain(&target.domain)
.domain_owner(&target.domain_owner)
.duration_seconds(900)
.send()
.await
.context("aws codeartifact get-authorization-token")?
.authorization_token
.ok_or_else(|| anyhow!("codeartifact returned no authorization token"))?;
let url = target.upload_url();
let http = http_client()?;
for (w, kind) in dists {
upload_dist(&http, &url, "aws", &token, w, *kind).await?;
}
Ok(())
}
async fn upload_pypi(token: &str, url: &str, dists: &[(PathBuf, DistKind)]) -> Result<()> {
let http = http_client()?;
for (w, kind) in dists {
upload_dist(&http, url, "__token__", token, w, *kind).await?;
}
Ok(())
}
fn http_client() -> Result<reqwest::Client> {View on GitHub (pinned to 0267ce9170)