archiveArtifacts not working with the S3 provider for globs including a number of files

Last Reviewed:2025-07-22()
2 minute readKnowledge base

Issue

After upgrading my CloudBees CI controller to 2.504.3.28224, I cannot upload to S3 a number of files using the artifact-manager-s3 plugin from my pipeline using a globs in the path pattern like in the following example:

archiveArtifacts(artifacts: "my-directory/**/*.*", fingerprint: true, onlyIfSuccessful: false, allowEmptyArchive: true)

This works for a small number of artifacts, but when the amount is larger this functionality now fails with the following error:

Unable to load credentials from any of the providers in the chain AwsCredentialsProviderChain(credentialsProviders=[SystemPropertyCredentialsProvider(), EnvironmentVariableCredentialsProvider(), WebIdentityTokenCredentialsProvider(), ProfileCredentialsProvider(profileName=default, profileFile=ProfileFile(sections=[])), ContainerCredentialsProvider(), InstanceProfileCredentialsProvider()]) : [SystemPropertyCredentialsProvider(): Unable to load credentials from system settings. Access key must be specified either via environment variable (AWS_ACCESS_KEY_ID) or system property (aws.accessKeyId)., EnvironmentVariableCredentialsProvider(): Unable to load credentials from system settings. Access key must be specified either via environment variable (AWS_ACCESS_KEY_ID) or system property (aws.accessKeyId)., WebIdentityTokenCredentialsProvider(): Either the environment variable AWS_WEB_IDENTITY_TOKEN_FILE or the javaproperty aws.webIdentityTokenFile must be set., ProfileCredentialsProvider(profileName=default, profileFile=ProfileFile(sections=[])): Profile file contained no credentials for profile 'default': ProfileFile(sections=[]), ContainerCredentialsProvider(): Cannot fetch credentials from container - neither AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variables are set., InstanceProfileCredentialsProvider(): Failed to load credentials from IMDS.]

Resolution

There are two different bugs behind this problem. One is an authentication issue that was fixed in artifact-manager-s3 933.v8d8e261d72b_8, and another with recursive loads (globs) that hasn’t been fixed yet.

Upgrading the plugin to 933.v8d8e261d72b_8 or later can fix the problem in those cases when the issue was caused by an invalid authentication. CloudBees CI version 2.516.1.28669 includes a version of the plugin that contains the fix. You should upgrade to 2.516.1.28669 or later to get it.

Workaround

  • Modify your pipeline code to first create a tarball or ZIP of all the files that you want to upload and and archive that as a single blob.

Tested product/plugin versions

  • CloudBees CI on modern cloud platforms - managed controller version 2.504.3.28224

  • artifact-manager-s3-plugin versions 933.v8d8e261d72b_8, 926.ve7c0b_ffccd20 and 902.v39b_3d56b_88b_5

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.