{"id":17931066,"url":"https://github.com/jenkinsci/artifact-manager-s3-plugin","last_synced_at":"2025-04-05T03:12:43.298Z","repository":{"id":31154940,"uuid":"127051186","full_name":"jenkinsci/artifact-manager-s3-plugin","owner":"jenkinsci","description":"Artifact manager implementation for Amazon S3","archived":false,"fork":false,"pushed_at":"2025-02-26T21:55:55.000Z","size":2784,"stargazers_count":60,"open_issues_count":11,"forks_count":68,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T02:07:54.849Z","etag":null,"topics":["aws","jenkins-security-scan-enabled"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/artifact-manager-s3/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-27T22:07:06.000Z","updated_at":"2025-02-26T21:29:08.000Z","dependencies_parsed_at":"2023-12-20T17:43:47.082Z","dependency_job_id":"7aedd9c5-84c9-47c4-8d08-431f734d7cfe","html_url":"https://github.com/jenkinsci/artifact-manager-s3-plugin","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fartifact-manager-s3-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fartifact-manager-s3-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fartifact-manager-s3-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fartifact-manager-s3-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/artifact-manager-s3-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280272,"owners_count":20912967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","jenkins-security-scan-enabled"],"created_at":"2024-10-28T21:19:23.998Z","updated_at":"2025-04-05T03:12:43.279Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Artifact Manager on S3 plugin\n\nArtifact Manager on S3 plugin is an Artifact Manager that allow you to store your artifacts into a S3 Bucket on Amazon.\nThe use of this S3 Bucket as a artifact storage is transparent to Jenkins and your jobs, it works like the default \nArtifact Manager.\n\nArtifact manager implementation for Amazon S3, currently using the jClouds library.\n[wiki](https://wiki.jenkins.io/display/JENKINS/Artifact+Manager+S3+Plugin)\n\n# Prerequisites\n\nFirst of all, you will need a Amazon account, this Amazon account should have permissions over the S3 Bucket that \nyou want to use as artifact storage.\n\nThe plugin is expected to run with a IAM profile and the S3 bucket must be already created.\nWhen running in AWS that means the instance needs to have\nan IAM role set with a policy that allows access to the S3 bucket to be used.\n\nThis is an example policy\n\n```json\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"AllowListingOfFolder\",\n            \"Effect\": \"Allow\",\n            \"Action\": \"s3:ListBucket\",\n            \"Resource\": \"arn:aws:s3:::my-bucket-name\",\n            \"Condition\": {\n                \"StringLike\": {\n                    \"s3:prefix\": \"some/path/*\"\n                }\n            }\n        },\n        {\n            \"Sid\": \"AllowS3ActionsInFolder\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:PutObject\",\n                \"s3:GetObject\",\n                \"s3:ListObjects\"\n            ],\n            \"Resource\": \"arn:aws:s3:::my-bucket-name/some/path/*\"\n        }\n    ]\n}\n```\n\n# Configuration\n\nIn order to configure the plugin on Jenkins, you have to go to Manage Jenkins/Configure System to \nthe `Artifact Management for Builds` section, there you have to select the Cloud Provider `Amazon S3`.\n\n![](images/cloud-provider-no-configured.png)\n\nThen you have to configure your credentials to access the AWS services, go to Manage Jenkins/Amazon Web Services Configuration,\nthere you can configure the Region and the Amazon Credentials to use, you have to save or apply this setting before to continue.\nFor more details check [AWS Credentials](#aws-credentials)\n\n![](images/configure-credentials.png)\n\n* S3 Bucket Region: Region to use to generate the URLs to get/put artifacts, by default it is autodetected.\n\nAfter that you can configure the S3 Bucket settings on Manage Jenkins/Amazon Web Services Configuration on the section `Artifact Manager Amazon S3 Bucket` in \nthe same configuration page.\n\n* S3 Bucket Name: Name of the S3 Bucket to use to store artifacts.\n* Base Prefix: Prefix to use for files and folders inside the S3 Bucket, if the prefix is a folder should be end with `/`.\n* Delete Artifacts: See [Delete Artifacts](#delete-artifacts) for discussion.\n* Delete Stashes: See [Delete Stash](#delete-stash) for discussion.\n* Custom Endpoint: Custom host and port (e.g. minio.myorg.org:9000) for the S3 client to connect to. This is typically used when using an S3 compatible provider (e.g. Azure, Google Cloud, minio) and not AWS S3.\n* Custom Signing Region: Only used when a Custom Endpoint is specified ('us-east-1' is used if it is blank).\n* Use Path Style URL: When this option is enabled URLs are formatted https://endpoint/bucket/key (path style) and when this option is disabled URLs are formatted as https://bucket.endpoint/key (virtual hosting style).\n* Use Insecure HTTP: Use URLs with the http protocol instead of the https protocol.\n* Use Transfer Acceleration: Use [S3 Transfer Acceleration](https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)\n* Disable Session Token: When this option is enabled the plugin won't contact AWS for a session token and will just use the access key and secret key as configured by the Amazon Credentials plugin.\n\n![](images/bucket-settings.png)\n\nEvery field on the configuration form has a validation, this validation will check that the field value is a proper value.\n\n![](images/s3-bucket-name-not-valid.png)\n\nIf you save a wrong configuration, you will see a related error explained why, then you have to came back to \nthe configuration page to set the proper value.\n\n![](images/save-wrong-configuration.png) \n\nBefore saving the configuration, we recommend you to test the configuration by using the \"Validate S3 Bucket configuration\" \nbutton. This button will test the bucket exists and the credentials used are valid and has access to the bucket. \nSee the [troubleshooting section](#troubleshooting) for more details about the reported error. \n\n![](images/validation-success.png)\n\nIf you're using a non AWS S3 service, you will need to use a custom endpoint, use path style URLs and disable session tokens.  We recommend you consult the documentation of the service for the requirements\n\n![](images/custom-s3-service-configuration.png)\n\nFor Google Cloud Storage:\n\n* the AWS Credentials need to correspond to a Google Service Account HMAC key (Access ID / Secret) - See [this documentation](https://cloud.google.com/storage/docs/authentication/hmackeys)\n* the custom endpoint is `storage.googleapis.com`\n\nFinally the \"Create S3 Bucket from configuration\" button allow you to create the bucket if it does not exist \nand the AWS credentials configured have permission to create a S3 Bucket.\n\n# How to use  Artifact Manager on S3 plugin\n\nArtifact Manager on S3 plugin is transparently used by the Jenkins Artifact system, so as other Artifacts Managers, \nyou only have to use the Artifact Step to archive/unarchive, and the stash/unstash step, let's see how it works. \nWe have also to mention here, the [Copy Artifacts plugin](https://plugins.jenkins.io/copyartifact) that allow you \nto download artifacts from a finished build.\n\n## Pipeline job\n\nArtifact Manager on S3 plugin can be use in a [Pipeline](https://jenkins.io/doc/book/pipeline/) job, \nyou have to use the `archiveArtifacts` step to archive artifacts in the S3 Bucket, for more details you can check \nthe [archiveArtifacts step documentation](https://jenkins.io/doc/pipeline/steps/core/#archiveartifacts-archive-the-artifacts)\n\n```\nnode() {\n    //you build stuff\n    //...\n    stage('Archive') {\n        archiveArtifacts \"my-artifacts-pattern/*\"\n    }\n}\n```\n\nfor unarchive artifacts you have to use the `unarchive` step that will retrieve the artifacts from S3 Bucket, \nthe mapping parameter is list of pairs `source-filename` `destination-filename`, for more details you can check \nthe [unarchive step documentation](https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#code-unarchive-code-copy-archived-artifacts-into-the-workspace)\n\n```\nnode() {\n    //you build stuff\n    //...\n    stage('Unarchive') {\n        unarchive mapping: [\"my-artifacts-pattern/\": '.']\n    }\n}\n```\n\nto save a set of files for use later in the same build, generally on another node/workspace, \nyou can use [stash](https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build),\n`stash` step will store those files on the S3 Bucket for later use.\n\n```\nnode() {\n    //you build stuff\n    //...\n    stash name: 'stuff', includes: '*'\n}\n```\n\nto retrieve those files saved with the `stash` step you have to use the [unstash](https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#unstash-restore-files-previously-stashed)\nstep, `unstash` will retrieve the files from the S3 Bucket to the local workspace. \n\n```\nnode() {\n    //you build stuff\n    //...\n    unstash 'stuff'\n}\n```\n\n## FreeStyle job\n\nOn FreeStyle jobs, you can archive artifacts by using a `Post-build Action` of type `Archive the Artifacts`, \nthis step would use the Artifact Manager on S3 plugin to store the artifacts into the S3 Bucket.\n\n![](images/fsj-step-archive.png)\n\n# Manage Artifacts\n\nThe default behaviour of the plugin it is not delete artifact from the S3 Bucket, so the artifacts storaged \non the S3 Bucket would be in the S3 bucket even do you remove the build from Jenkins. \nIf you want to change this behaviour you should define a couple of JVM properties.\n\n## Delete Artifacts\n\nIn order to delete artifacts on the S3 Bucket, you would have to add the property \n`-Dio.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStoreConfig.deleteArtifacts=true` to your Jenkins JVM properties \n, if it is not set the artifacts will not be deleted from S3 Bucket when the corresponding build is deleted.\nYou would also need to grant the `s3:DeleteObject` permission.\n\nThis mode is not recommended:\na compromised controller could delete data,\nand builds deleted from `$JENKINS_HOME` (or not restored from backups) will leave orphaned blobs.\nYou should instead configure your blob store to automatically delete artifacts older than a certain age,\nand/or move them to cheaper long-term storage.\n\n## Delete Stash\n\nIn order to delete stashes on the S3 Bucket, you would have to add the property \n`-Dio.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStoreConfig.deleteStashes=true`  to your Jenkins JVM properties\n, if it is not set the stash will not be deleted from S3 when the corresponding build is deleted.\n\nThis mode is not recommended for the same reason as the delete artifacts option.\nNote that stashes and artifacts use distinct top-level directories,\nso you can configure distinct retention policies for them\n(for example keeping stashes only for a day but keeping artifacts for a month).\n\n# AWS Credentials\n\nArtifact Manager on S3 plugin needs an AWS credentials in order to access to the S3 Bucket, you can select one on the\nconfiguration page. If you do not select any AWS credential and keep the \"\" dropdown on the option \"IAM instance Profile/user AWS configuration\"\nArtifact Manager on S3 plugin would try to use the IAM instance profile credentials of the Jenkins host, or user AWS configuration (~/.aws). \n\n![](images/configure-credentials.png)\n\nEvery time you archive/unarchive or download an artifact, Jenkins will generate a temporary URL, it will be valid for an hour, \nso if you try to reuse an artifact download URL one hour later was generated, it will not be valid, \nyou cannot download the artifact with that URL any more, thus you have to go back to Jenkins \nand click on the artifact to download it again. \n\nIf you use a regular Key/Secret AWS Credentials you can set the token duration by adding the property \n`-Dio.jenkins.plugins.aws.global_configuration.CredentialsAwsGlobalConfiguration.sessionDuration` to the Jenkins JVM properties,\nthe default value is one hour. However if you set an IAM Role to assume on the AWS credential,\nthe token duration is always one hour (3600), this parameter does not change the duration in AWS Credentials Plugin settings.\n\n# Extending Artifact Manager on S3 plugin\n\n## Testing\n\nPick an AWS profile and region, then create a scratch bucket and choose a subdirectory within it for testing.\nAdd to your `~/.m2/settings.xml`:\n\n```xml\n    \u003cprofiles\u003e\n        \u003cprofile\u003e\n            \u003cid\u003eartifact-manager-s3\u003c/id\u003e\n            \u003cactivation\u003e\n                \u003cactiveByDefault\u003etrue\u003c/activeByDefault\u003e\n            \u003c/activation\u003e\n            \u003cproperties\u003e\n                \u003cAWS_PROFILE\u003e…\u003c/AWS_PROFILE\u003e\n                \u003cAWS_REGION\u003e…\u003c/AWS_REGION\u003e\n                \u003cS3_BUCKET\u003e…\u003c/S3_BUCKET\u003e\n                \u003cS3_DIR\u003e…/\u003c/S3_DIR\u003e\n            \u003c/properties\u003e\n        \u003c/profile\u003e\n    \u003c/profiles\u003e\n```\n\nNow log in to AWS so that `~/.aws/credentials` is up to date with valid credentials, and run:\n\n```bash\nmvn clean test\n```\n\nFor interactive testing, you may instead add to `~/.mavenrc` (cf. comment in MNG-6303):\n\n```sh\nexport AWS_PROFILE=…\nexport AWS_REGION=…\n```\n\nthen:\n\n```bash\nmvn hpi:run\n```\n\nAlternately, you can test against MinIO:\n\n```bash\ndocker run --rm -e MINIO_ACCESS_KEY=dummy -e MINIO_SECRET_KEY=dummydummy -p 127.0.0.1:9000:9000 minio/minio server /data\n```\n\ncreating AWS credentials with that access \u0026 secret key,\nand enabling the `usePathStyleUrl`, `useHttp`, and `disableSessionToken` options,\nand using `localhost:9000` as the `customEndpoint`.\n\nAn example pipeline for testing:\n\n```\ntimestamps {\n  node('uploader') {\n    writeFile file: 'f', text: 'some content here'\n    archiveArtifacts 'f'\n  }\n  node('downloader') {\n    sh 'ls -l'\n    unarchive mapping: [f: 'f']\n    sh 'ls -l; cat f'\n  }\n}\n```\n\nYou can also install the `log-cli` plugin, and run:\n\n```bash\njava -jar jenkins-cli.jar -s http://localhost:8080/jenkins/ tail-log io.jenkins.plugins.artifact_manager_jclouds -l ALL\n```\n\nOr to just see HTTP traffic:\n\n```bash\njava -jar jenkins-cli.jar -s http://localhost:8080/jenkins/ tail-log org.jclouds.rest.internal.InvokeHttpMethod -l FINE\n```\n\n# Troubleshooting\n\n## No valid session credentials\n\nThe AWS credentials has to have the token attribute, Basic AWS credentials are not valid. You would see the following \nerrors in the Jenkins Logs\n\n![](images/validation-no-valid-credentials.png)\n \n```\nJun 06, 2018 4:20:33 PM hudson.model.Run getArtifactsUpTo\nWARNING: null\njava.io.IOException: No valid session credentials\n        at io.jenkins.plugins.artifact_manager_s3.S3BlobStore.getCredentialsSupplier(S3BlobStore.java:140)\n        at io.jenkins.plugins.artifact_manager_s3.S3BlobStore.getContext(S3BlobStore.java:120)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.getContext(JCloudsVirtualFile.java:99)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.listStorageMetadata(JCloudsVirtualFile.java:192)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:366)\n        at hudson.model.Run.getArtifactsUpTo(Run.java:1098)\n        at com.cloudbees.workflow.rest.external.RunExt.createMinimal(RunExt.java:253)\n```\n\nand in Pipeline console logs\n\n```\njava.io.IOException: No valid session credentials\n\tat io.jenkins.plugins.artifact_manager_s3.S3BlobStore.getCredentialsSupplier(S3BlobStore.java:140)\n\tat io.jenkins.plugins.artifact_manager_s3.S3BlobStore.getContext(S3BlobStore.java:120)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManager.getContext(JCloudsArtifactManager.java:359)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManager.archive(JCloudsArtifactManager.java:131)\n\tat hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:235)\n\tat org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)\n\tat org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)\n\tat hudson.security.ACL.impersonate(ACL.java:290)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n```\n\nCheck the environment variable AWS_PROFILE, it should point to a profile with aws_session_token in `~/aws/credentials`\n\n## Must provide an explicit region in the builder or setup environment to supply a region\n\nIn some cases the region should be specified, set the environment variable AWS_REGION to the correct region.\n\n\n```\ncom.amazonaws.SdkClientException: Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region.\n\tat com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:371)\n\tat com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(AwsClientBuilder.java:337)\n\tat com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)\n\tat io.jenkins.plugins.artifact_manager_s3.S3BlobStore.toExternalURL(S3BlobStore.java:196)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManager.archive(JCloudsArtifactManager.java:139)\n\tat hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:235)\n\tat org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)\n\tat org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)\n\tat hudson.security.ACL.impersonate(ACL.java:290)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n```\n\n## The provided token has expired\n\nWhen the AWS token is expired you will see the following error in logs, you have to refresh your AWS token.\n\n![](images/validation-session-expired.png)\n\nPipeline log\n\n```\nERROR: Failed to upload /home/user/artifact-manager-s3-plugin/work/agent/workspace/small-files/test/test-2.txt to https://my-bucket.s3.xx-xxxx-x.amazonaws.com/folder/small-files/114/artifacts/test/test-2.txt?…, response: 301 Moved Permanently, body: null\n```\n\nJenkins log\n\n```\nJun 06, 2018 5:40:42 PM hudson.ExpressionFactory2$JexlExpression evaluate\nWARNING: Caught exception evaluating: build.getArtifactsUpTo(build.TREE_CUTOFF+1) in /jenkins/job/small-files/. Reason: org.jclouds.aws.AWSResponseException: request GET https://my-bucket.s3.amazonaws.com/?prefix=folder/small-files/78/artifacts/ HTTP/1.1 failed with code 400, error: AWSError{requestId='XXXXX', requestToken='XXXXXXX=', code='ExpiredToken', message='The provided token has expired.', context='{Token-0=FQoDYXdzEKj//////////XXXXXXXX//vPushetZVjU6wXXXXXXX=, HostId=Q6+7KaTKjXXXXXXX=}'}\norg.jclouds.aws.AWSResponseException: request GET https://my-bucket.s3.amazonaws.com/?prefix=folder/small-files/78/artifacts/ HTTP/1.1 failed with code 400, error: AWSError{requestId='E64A06B2AC7FAED3', requestToken='Q6+7KaTKjqkkjjUdHgGi7/XXXXX0=', code='ExpiredToken', message='The provided token has expired.', context='{Token-0=FQoDYXdzEKj//////////XXXXXXXX//vPushetZVjU6wXXX=, HostId=Q6+7KaTXXXX=}'}\n        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:75)\n        at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)\n        at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:138)\n        at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:107)\n        at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:91)\n        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:74)\n        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:45)\n        at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)\n        at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)\n        at com.sun.proxy.$Proxy141.listBucket(Unknown Source)\n        at org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:177)\n        at org.jclouds.blobstore.BlobStores$1$1.computeNext(BlobStores.java:86)\n        at org.jclouds.blobstore.BlobStores$1$1.computeNext(BlobStores.java:73)\n        at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)\n        at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:313)\n        ... 77 more\n\n \n```\n\n## The region 'YYYY' is wrong; expecting 'XXXX'\n\nIf the AWS login region is different than the S3 Bucket region, you would see the following errors in logs, \nto fix it, you have to force the S3 bucket region on the Plugin configuration to the `S3 Bucket region`.\n\n![](images/validation-wrong-region.png)\n\n```\nhudson.remoting.ProxyException: org.jclouds.aws.AWSResponseException: request GET https://my-buckets3.amazonaws.com/?prefix=folder/small-files/139/artifacts/ HTTP/1.1 failed with code 400, error: AWSError{requestId='120C24FCF0A58541', requestToken='OcrNlauC5ArwjvfQEl7esXXXXXoeMy6dZLOxK9Cxyv9QNscw7G87L/bE3b5ic=', code='AuthorizationHeaderMalformed', message='The authorization header is malformed; the region 'xx-xxxx-x' is wrong; expecting 'xx-xxxx-x'', context='{Region=xx-xxxx-x, HostId=OcrNlauC5ArwjvfQEl7esXXXXXoeMy6dZLOxK9Cxyv9QNscw7G87L/bE3b5ic=}'}\n\tat org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:75)\n\tat org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)\n\tat org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:140)\n\tat org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:109)\n\tat org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)\n\tat org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)\n\tat org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)\n\tat org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)\n\tat org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)\n\tat com.sun.proxy.$Proxy128.listBucket(Unknown Source)\n\tat org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:175)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile$PageSetIterable.advanceList(JCloudsVirtualFile.java:322)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile$PageSetIterable.\u003cinit\u003e(JCloudsVirtualFile.java:286)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.listStorageMetadata(JCloudsVirtualFile.java:192)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:366)\n\tat jenkins.util.VirtualFile.list(VirtualFile.java:195)\n\tat jenkins.util.VirtualFile.list(VirtualFile.java:178)\n\tat org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:43)\n\tat org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:18)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)\n\tat hudson.security.ACL.impersonate(ACL.java:290)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n```\n\n## Empty S3 Bucket name\n\nThe configuration will warning you about you are trying to save a empty bucket name even do you save the configuration, \nand you try to archive artifacts, you would see the following errors. To fix it you have to set a proper S3 Bucket name.\n\n![](images/validation-empty-bucket-name.png)\n\nPipeline log\n```\nERROR: Failed to upload /home/user/artifact-manager-s3-plugin/work/agent/workspace/small-files@tmp/stash2772898641820040408.tgz to https://s3.xx-xxxx-x.amazonaws.com/folder/small-files/159/stashes/stuff.tgz?…, response: 301 Moved Permanently, body: null\n```\n\nJenkins log\n```\nJun 06, 2018 6:23:04 PM hudson.ExpressionFactory2$JexlExpression evaluate\nWARNING: Caught exception evaluating: build.getArtifactsUpTo(build.TREE_CUTOFF+1) in /jenkins/job/small-files/. Reason: java.lang.IllegalArgumentException: Validation on '[java.lang.String arg0, [Lorg.jclouds.s3.options.ListBucketOptions; arg1]' didn't pass:\n Reason: Object '' doesn't match S3 bucket bucket naming convention. Reason: Can't be less than 3 characters. For more info, please refer to https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html.\njava.lang.IllegalArgumentException: Validation on '[java.lang.String arg0, [Lorg.jclouds.s3.options.ListBucketOptions; arg1]' didn't pass:\n Reason: Object '' doesn't match S3 bucket bucket naming convention. Reason: Can't be less than 3 characters. For more info, please refer to https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html.\n        at org.jclouds.rest.InputParamValidator.validateMethodParametersOrThrow(InputParamValidator.java:72)\n        at org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:193)\n        at org.jclouds.rest.internal.RestAnnotationProcessor.apply(RestAnnotationProcessor.java:137)\n        at org.jclouds.rest.internal.InvokeHttpMethod.toCommand(InvokeHttpMethod.java:188)\n        at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:84)\n        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)\n        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)\n        at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)\n        at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)\n        at com.sun.proxy.$Proxy133.listBucket(Unknown Source)\n        at org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:175)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile$PageSetIterable.advanceList(JCloudsVirtualFile.java:322)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile$PageSetIterable.\u003cinit\u003e(JCloudsVirtualFile.java:286)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.listStorageMetadata(JCloudsVirtualFile.java:192)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:366)\n        at hudson.model.Run.getArtifactsUpTo(Run.java:1098)\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n        at java.lang.reflect.Method.invoke(Method.java:498)\n...\n        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n        at org.eclipse.jetty.server.Server.handle(Server.java:564)\n        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)\n        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\n        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\n        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)\n        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\n        at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)\n        at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)\n        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)\n        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)\n        at java.lang.Thread.run(Thread.java:748)\nCaused by: java.lang.IllegalArgumentException: Object '' doesn't match S3 bucket bucket naming convention. Reason: Can't be less than 3 characters. For more info, please refer to https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html\n        at org.jclouds.s3.predicates.validators.BucketNameValidator.exception(BucketNameValidator.java:59)\n        at org.jclouds.s3.predicates.validators.BucketNameValidator.validate(BucketNameValidator.java:50)\n        at org.jclouds.aws.s3.predicates.validators.AWSS3BucketNameValidator.validate(AWSS3BucketNameValidator.java:50)\n        at org.jclouds.aws.s3.predicates.validators.AWSS3BucketNameValidator.validate(AWSS3BucketNameValidator.java:32)\n        at org.jclouds.predicates.Validator.apply(Validator.java:37)\n        at org.jclouds.rest.InputParamValidator.runPredicatesAgainstArg(InputParamValidator.java:128)\n        at org.jclouds.rest.InputParamValidator.performParameterValidation(InputParamValidator.java:112)\n        at org.jclouds.rest.InputParamValidator.validateMethodParametersOrThrow(InputParamValidator.java:70)\n        ... 130 more\n```\n\n## The specified bucket does not exist\n\nIf you set an unexistent S3 Bucket you would see the following errors in logs, \nto fix it set a proper S3 Bucket name in the Plugin configuration.\n\n![](images/validation-s3-bucket-does-not-exists.png)\n\n```\nNFO: small-files #170 completed: FAILURE\nJun 07, 2018 2:01:40 PM hudson.model.Run getArtifactsUpTo\nWARNING: null\njava.io.IOException: org.jclouds.blobstore.ContainerNotFoundException: borken.s3-xx-xxxx-x.amazonaws.com not found: The specified bucket does not exist\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:384)\n        at hudson.model.Run.getArtifactsUpTo(Run.java:1098)\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n        at java.lang.reflect.Method.invoke(Method.java:498)\n        at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)\n...\n        at org.eclipse.jetty.server.Server.handle(Server.java:564)\n        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:317)\n        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\n        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\n        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)\n        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\n        at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128)\n        at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222)\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294)\n        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199)\n        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)\n        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)\n        at java.lang.Thread.run(Thread.java:748)\nCaused by: org.jclouds.blobstore.ContainerNotFoundException: borken.s3-xx-xxxx-x.amazonaws.com not found: The specified bucket does not exist\n        at org.jclouds.s3.handlers.ParseS3ErrorFromXmlContent.refineException(ParseS3ErrorFromXmlContent.java:81)\n        at org.jclouds.aws.handlers.ParseAWSErrorFromXmlContent.handleError(ParseAWSErrorFromXmlContent.java:89)\n        at org.jclouds.http.handlers.DelegatingErrorHandler.handleError(DelegatingErrorHandler.java:65)\n        at org.jclouds.http.internal.BaseHttpCommandExecutorService.shouldContinue(BaseHttpCommandExecutorService.java:140)\n        at org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:109)\n        at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)\n        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)\n        at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)\n        at org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)\n        at org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)\n        at com.sun.proxy.$Proxy129.listBucket(Unknown Source)\n        at org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:175)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile$PageSetIterable.advanceList(JCloudsVirtualFile.java:329)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile$PageSetIterable.\u003cinit\u003e(JCloudsVirtualFile.java:293)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.listStorageMetadata(JCloudsVirtualFile.java:192)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:374)\n        ... 116 more\n```\n\n## Network outages\n\nThe following message of error appears when the host it is not accessible meanwhile we are sending/getting data from S3.\n\n```\nhudson.remoting.ProxyException: java.net.SocketException: Unexpected end of file from server\n\tat sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:851)\n\tat sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)\n\tat sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2055)\n\tat sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)\n\tat sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)\n\tat sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)\n\tat sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)\n\tat org.jclouds.http.internal.JavaUrlHttpCommandExecutorService.invoke(JavaUrlHttpCommandExecutorService.java:97)\nCaused: hudson.remoting.ProxyException: java.net.SocketException: Unexpected end of file from server\n\tat sun.reflect.GeneratedConstructorAccessor152.newInstance(Unknown Source)\n\tat sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n\tat java.lang.reflect.Constructor.newInstance(Constructor.java:423)\n\tat sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1944)\n\tat sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939)\n\tat java.security.AccessController.doPrivileged(Native Method)\n\tat sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938)\n\tat sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508)\n\tat sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)\n\tat java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)\n\tat sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:347)\n\tat org.jclouds.http.internal.JavaUrlHttpCommandExecutorService.invoke(JavaUrlHttpCommandExecutorService.java:105)\n\tat org.jclouds.http.internal.JavaUrlHttpCommandExecutorService.invoke(JavaUrlHttpCommandExecutorService.java:65)\n\tat org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:100)\nCaused: hudson.remoting.ProxyException: org.jclouds.http.HttpResponseException: Unexpected end of file from server connecting to GET https://my-bucket-s3-xx-xxxx-x.amazonaws.com/?prefix=folder/small-files/174/artifacts/ HTTP/1.1\n\tat org.jclouds.http.internal.BaseHttpCommandExecutorService.invoke(BaseHttpCommandExecutorService.java:122)\n\tat org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)\n\tat org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)\n\tat org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)\n\tat org.jclouds.rest.internal.DelegatesToInvocationFunction.handle(DelegatesToInvocationFunction.java:156)\n\tat org.jclouds.rest.internal.DelegatesToInvocationFunction.invoke(DelegatesToInvocationFunction.java:123)\n\tat com.sun.proxy.$Proxy124.listBucket(Unknown Source)\n\tat org.jclouds.s3.blobstore.S3BlobStore.list(S3BlobStore.java:175)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile$PageSetIterable.advanceList(JCloudsVirtualFile.java:329)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile$PageSetIterable.\u003cinit\u003e(JCloudsVirtualFile.java:293)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.listStorageMetadata(JCloudsVirtualFile.java:192)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:374)\nCaused: hudson.remoting.ProxyException: java.io.IOException: org.jclouds.http.HttpResponseException: Unexpected end of file from server connecting to GET https://my-bucket-s3-xx-xxxx-x.amazonaws.com/?prefix=folder/small-files/174/artifacts/ HTTP/1.1\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:384)\n\tat jenkins.util.VirtualFile.list(VirtualFile.java:195)\n\tat jenkins.util.VirtualFile.list(VirtualFile.java:178)\n\tat org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:46)\n\tat org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:20)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)\n\tat hudson.security.ACL.impersonate(ACL.java:290)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n```\n\n```\nJun 07, 2018 4:51:20 PM org.jclouds.logging.jdk.JDKLogger logError\nSEVERE: Cannot retry after server error, command has exceeded retry limit 5: [method=org.jclouds.aws.s3.AWSS3Client.public abstract org.jclouds.s3.domain.ListBucketResponse org.jclouds.s3.S3Client.listBucket(java.lang.String,org.jclouds.s3.options.ListBucketOptions[])[mybucket-s3, [Lorg.jclouds.s3.options.ListBucketOptions;@1901a532], request=GET https://my-bucket-s3-xx-xxxx-x.amazonaws.com/?prefix=folder/big-file/12/artifacts/ HTTP/1.1]\nJun 07, 2018 4:51:20 PM hudson.model.Run getArtifactsUpTo\nWARNING: null\n```\n\n```\n11:53:58 Archiving artifacts\n11:54:54 Retrying upload after: java.net.SocketException: Broken pipe (Write failed)\n\n...\n12:00:02 Retrying upload after: java.net.SocketException: Broken pipe (Write failed)\n12:01:06 Retrying upload after: java.net.SocketException: Broken pipe (Write failed)\n```\n\n## Member must have length greater than or equal to 20\n\nIf you use an invalid IAM Role ID on your credentials, you would see the following error, \nyou have to set a proper ARN specifying the IAM role to assume. The format should be something like: \n\"arn:aws:iam::123456789012:role/MyIAMRoleName\".\n\n![](images/no-valid-iam-role.png)\n\n```\nJun 15, 2018 12:01:16 PM hudson.model.Run getArtifactsUpTo\nWARNING: null\njava.io.IOException: com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException: 1 validation error detected: Value 'MyIAMRoleName' at 'roleArn' failed to satisfy constraint: Member must have length greater than or equal to 20 (Service: AWSSecurityTokenService; Status Code: 400; Error Code: ValidationError; Request ID: XXXXXX)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:321)\n        at hudson.model.Run.getArtifactsUpTo(Run.java:1098)\n...\n        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)\n        at java.lang.Thread.run(Thread.java:748)\nCaused by: com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException: 1 validation error detected: Value 'MyIAMRoleName' at 'roleArn' failed to satisfy constraint: Member must have length greater than or equal to 20 (Service: AWSSecurityTokenService; Status Code: 400; Error Code: ValidationError; Request ID: XXXXXX)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1632)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1304)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1058)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)\n        at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)\n        at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.doInvoke(AWSSecurityTokenServiceClient.java:1307)\n        at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.invoke(AWSSecurityTokenServiceClient.java:1283)\n        at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.executeAssumeRole(AWSSecurityTokenServiceClient.java:466)\n        at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.assumeRole(AWSSecurityTokenServiceClient.java:442)\n        at com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl.getCredentials(AWSCredentialsImpl.java:124)\n        at io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.sessionCredentialsFromKeyAndSecret(S3BlobStore.java:145)\n        at io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.getCredentialsSupplier(S3BlobStore.java:186)\n        at io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.getContext(S3BlobStore.java:126)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.getContext(JCloudsVirtualFile.java:96)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.listStorageMetadata(JCloudsVirtualFile.java:190)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:313)\n        ... 77 more\n\n```\n\n## User: arn:aws:iam::XXXXXX:user/people/myUser is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::XXXXXXX:role/my-role\n\nIf you see the following error, your user would not assume the IAM Role that you set on your Jenkins AWS Credentials. \nCheck that your user can assume that IAM Role in AWS Console.\n\n![](images/cannot-assume-role.png)\n\n```\nJun 15, 2018 12:00:15 PM hudson.model.Run getArtifactsUpTo\nWARNING: null\njava.io.IOException: com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException: User: arn:aws:iam::XXXXXX:user/people/myUser is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::XXXXXXX:role/my-role (Service: AWSSecurityTokenService; Status Code: 403; Error Code: AccessDenied; Request ID: XXXXXX)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:321)\n        at hudson.model.Run.getArtifactsUpTo(Run.java:1098)\n        at com.cloudbees.workflow.rest.external.RunExt.createMinimal(RunExt.java:253)\n        at com.cloudbees.workflow.rest.external.RunExt.createNew(RunExt.java:317)\n        at com.cloudbees.workflow.rest.external.RunExt.create(RunExt.java:309)\n        at com.cloudbees.workflow.rest.external.JobExt.create(JobExt.java:131)\n        at com.cloudbees.workflow.rest.endpoints.JobAPI.doRuns(JobAPI.java:69)\n        at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)\n...\n        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)\n        at java.lang.Thread.run(Thread.java:748)\nCaused by: com.amazonaws.services.securitytoken.model.AWSSecurityTokenServiceException: User: arn:aws:iam::XXXXXX:user/people/myUser is not authorized to perform: sts:AssumeRole on resource: arn:aws:iam::XXXXXXX:role/my-role (Service: AWSSecurityTokenService; Status Code: 403; Error Code: AccessDenied; Request ID: XXXXXX)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1632)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1304)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1058)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)\n        at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)\n        at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)\n        at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.doInvoke(AWSSecurityTokenServiceClient.java:1307)\n        at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.invoke(AWSSecurityTokenServiceClient.java:1283)\n        at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.executeAssumeRole(AWSSecurityTokenServiceClient.java:466)\n        at com.amazonaws.services.securitytoken.AWSSecurityTokenServiceClient.assumeRole(AWSSecurityTokenServiceClient.java:442)\n        at com.cloudbees.jenkins.plugins.awscredentials.AWSCredentialsImpl.getCredentials(AWSCredentialsImpl.java:124)\n        at io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.sessionCredentialsFromKeyAndSecret(S3BlobStore.java:145)\n        at io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.getCredentialsSupplier(S3BlobStore.java:186)\n        at io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.getContext(S3BlobStore.java:126)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.getContext(JCloudsVirtualFile.java:96)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.listStorageMetadata(JCloudsVirtualFile.java:190)\n        at io.jenkins.plugins.artifact_manager_jclouds.JCloudsVirtualFile.run(JCloudsVirtualFile.java:313)\n        ... 77 more\n\n```\n\n## Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region. \n\nThere is no user AWS configuration (~/.aws), and there is not AWS credential configured. You need a user AWS configuration, \nor you have to configure an AWS credential in Jenkins. \n\n![](images/unable-to-get-region-from-environment.png)\n\n![](images/unable-to-get-credentials-from-environment.png)\n \n```\ncom.amazonaws.SdkClientException: Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region.\n\tat com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:371)\n\tat com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(AwsClientBuilder.java:337)\n\tat com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46)\n\tat io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.sessionCredentialsFromKeyAndSecret(S3BlobStore.java:154)\n\tat io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.getCredentialsSupplier(S3BlobStore.java:187)\n\tat io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.getContext(S3BlobStore.java:127)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManager.getContext(JCloudsArtifactManager.java:316)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManager.archive(JCloudsArtifactManager.java:116)\n\tat hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:235)\n\tat org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)\n\tat org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)\n\tat hudson.security.ACL.impersonate(ACL.java:290)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n```\n\n```\njava.lang.NullPointerException\n\tat com.amazonaws.auth.AbstractAWSSigner.sanitizeCredentials(AbstractAWSSigner.java:411)\n\tat com.amazonaws.auth.AWS4Signer.presignRequest(AWS4Signer.java:273)\n\tat com.amazonaws.services.s3.AmazonS3Client.generatePresignedUrl(AmazonS3Client.java:3009)\n\tat com.amazonaws.services.s3.AmazonS3Client.generatePresignedUrl(AmazonS3Client.java:2945)\n\tat io.jenkins.plugins.artifact_manager_jclouds.s3.S3BlobStore.toExternalURL(S3BlobStore.java:246)\n\tat io.jenkins.plugins.artifact_manager_jclouds.JCloudsArtifactManager.archive(JCloudsArtifactManager.java:124)\n\tat hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:235)\n\tat org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)\n\tat org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)\n\tat hudson.security.ACL.impersonate(ACL.java:290)\n\tat org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\n```\n\n# Changelog\n\n## 1.7 and newer\n\nSee [GitHub releases](https://github.com/jenkinsci/artifact-manager-s3-plugin/releases).\n\n## 1.6 and older\n\nSee [archives](https://github.com/jenkinsci/artifact-manager-s3-plugin/blob/717b4c00169f9ceef271d72236c6a3dbe5651efc/README.md#16-2019-05-23).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fartifact-manager-s3-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fartifact-manager-s3-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fartifact-manager-s3-plugin/lists"}