{"record":{"id":"280ac4e1dc45b8fe","repo":"dbt-labs/dbt-core","slug":"codeartifact-returned-no-authorization-token","errorCode":null,"errorMessage":"codeartifact returned no authorization token","messagePattern":"codeartifact returned no authorization token","errorType":"exception","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"crates/dbt-ci/src/publish.rs","lineNumber":311,"sourceCode":"        target.domain, target.region, target.profile,\n    );\n    let region = aws_config::Region::new(target.region.clone());\n    let conf = aws_config::defaults(aws_config::BehaviorVersion::latest())\n        .region(region)\n        .profile_name(&target.profile)\n        .load()\n        .await;\n    let client = aws_sdk_codeartifact::Client::new(&conf);\n    let token = client\n        .get_authorization_token()\n        .domain(&target.domain)\n        .domain_owner(&target.domain_owner)\n        .duration_seconds(900)\n        .send()\n        .await\n        .context(\"aws codeartifact get-authorization-token\")?\n        .authorization_token\n        .ok_or_else(|| anyhow!(\"codeartifact returned no authorization token\"))?;\n\n    let url = target.upload_url();\n    let http = http_client()?;\n    for (w, kind) in dists {\n        upload_dist(&http, &url, \"aws\", &token, w, *kind).await?;\n    }\n    Ok(())\n}\n\nasync fn upload_pypi(token: &str, url: &str, dists: &[(PathBuf, DistKind)]) -> Result<()> {\n    let http = http_client()?;\n    for (w, kind) in dists {\n        upload_dist(&http, url, \"__token__\", token, w, *kind).await?;\n    }\n    Ok(())\n}\n\nfn http_client() -> Result<reqwest::Client> {","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-ci/src/publish.rs#L293-L329","documentation":"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.","triggerScenarios":"Thrown at crates/dbt-ci/src/publish.rs:311 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}