spinnaker/spinnaker · error · ResponseStatusException

artifact failed to be retrieved: bucket=

Error message

artifact failed to be retrieved: bucket=%s ref=%s: %s

What it means

S3ArtifactStoreGetter.get downloads a stored artifact from S3 and wraps any failure that is NOT an AWS SDK service exception in a RuntimeException whose message is formatted by getErrorMessage as "artifact failed to be retrieved: bucket=%s ref=%s: %s". This is the generic-failure path: non-SDK errors such as local decoding/processing problems or unexpected runtime exceptions while resolving the artifact reference.

Solutions

  1. Inspect the wrapped cause (getCause()) — the message's trailing %s contains the underlying error text.
  2. Verify the S3 bucket and object referenced by the artifact URI exist and are readable; check AWS credentials/region configuration.
  3. If the object exists but is malformed, re-publish the artifact via S3ArtifactStoreStorer so a valid reference is stored.
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-check the reference URI and configured bucket before fetching
URI.create(ref); // throws early on malformed URIs

Try / catch

try {
  byte[] data = artifactStoreGetter.get(uri);
} catch (RuntimeException e) {
  log.error("artifact retrieval failed for {}: {}", uri, e.getCause(), e);
  throw new ArtifactResolutionException(uri, e.getCause());
}

Prevention

When it happens

Trigger: Calling get() (via the artifact endpoint) when reading/building the artifact fails with a non-SdkServiceException — e.g. an IOException or NullPointerException while processing the downloaded object, or a client-level (non-service) SDK failure.

Common situations: Corrupt or unexpectedly formatted S3 objects, credential-provider chain failures that surface as generic exceptions, or bugs in registered ArtifactDecorators.

Understand the failure class

Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.

Related errors


AI-assisted analysis of spinnaker/spinnaker@1d4a5d0f6d (2026-09-10). Data as JSON: /api/errors/ea13697765379448. Report an issue: GitHub.

Appendix: source

Thrown at kork/kork-artifacts/src/main/java/com/netflix/spinnaker/kork/artifacts/artifactstore/s3/S3ArtifactStoreGetter.java:87

    try {
      ResponseBytes<GetObjectResponse> resp = s3Client.getObjectAsBytes(request);
      Artifact.ArtifactBuilder builder =
          Artifact.builder()
              .type(ArtifactTypes.REMOTE_BASE64.getMimeType())
              .reference(Base64.getEncoder().encodeToString(resp.asByteArray()));

      if (decorators == null) {
        return builder.build();
      }

      for (ArtifactDecorator decorator : decorators) {
        builder = decorator.decorate(builder);
      }

      return builder.build();
    } catch (SdkServiceException e) {
      throw new ResponseStatusException(e.statusCode(), getErrorMessage(uri, e), e);
    } catch (Exception e) {
      throw new RuntimeException(getErrorMessage(uri, e), e);
    }
  }

  private String getErrorMessage(ArtifactReferenceURI uri, Exception e) {
    return String.format(
        "artifact failed to be retrieved: bucket=%s ref=%s: %s", this.bucket, uri, e.getMessage());
  }

  /**
   * hasAuthorization will ensure that the user has proper permissions for retrieving the stored
   * artifact
   *
   * @throws AuthenticationServiceException when user does not have correct permissions
   */
  private void hasAuthorization(ArtifactReferenceURI uri, String userId) {
    GetObjectTaggingRequest request =

View on GitHub (pinned to 1d4a5d0f6d)