Bucket option is required for cleaning up S3 repository – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.4-7.5

Briefly, this error occurs when Elasticsearch is trying to clean up an S3 repository, but the bucket option is not specified. The bucket option is necessary to identify the specific S3 bucket to be cleaned. To resolve this issue, you should specify the bucket option in your cleanup command. You can do this by adding the ‘bucket’ parameter followed by the name of your S3 bucket. If you’re unsure of the bucket name, you can find it in your AWS S3 console. Always ensure to provide all required parameters when performing operations in Elasticsearch.

This guide will help you check for common problems that cause the log ” bucket option is required for cleaning up S3 repository ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: repository.

Log Context

Log “bucket option is required for cleaning up S3 repository” class name is CleanupS3RepositoryCommand.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 throw new ElasticsearchException("you must not specify both region and endpoint");
 }  String bucket = bucketOption.value(options);
 if (Strings.isNullOrEmpty(bucket)) {
 throw new ElasticsearchException("bucket option is required for cleaning up S3 repository");
 }  String basePath = basePathOption.value(options);
 if (basePath.endsWith("/")) {
 throw new ElasticsearchException("there should be not trailing slash in the base path");


How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?