pentaho/pentaho-kettle · error · FileSystemException
Exception getting the list of buckets
Error message
Exception getting the list of buckets
What it means
S3Provider.getLocations() wraps any failure while listing the S3 buckets of the configured connection into a Commons VFS FileSystemException with the message 'Exception getting the list of buckets '. The real cause (bad credentials, network failure, missing permissions) is attached as the cause and logged first with the connection name.
Solutions
- Verify the AWS access key/secret and region configured on the S3 connection (s3Details).
- Grant the IAM user s3:ListAllMyBuckets permission on the account.
- Inspect the logged cause (Kettle log line above the exception) to identify the underlying AWS SDK error.
- Test connectivity from the host running Pentaho (network/proxy/DNS) to s3.amazonaws.com.
- Enable VFS debug logging to capture the full AWS SDK stack trace.
Example fix
// before
for ( Bucket bucket : s3.listBuckets() ) { ... }
// after
try {
for ( Bucket bucket : s3.listBuckets() ) { ... }
} catch ( AmazonServiceException e ) {
throw new FileSystemException( "Exception getting the list of buckets: " + e.getErrorCode(), e );
} Defensive patterns
Strategy: try-catch
Validate before calling
// validate before resolving BasicAWSCredentials creds = new BasicAWSCredentials( accessKey, secretKey ); AmazonS3 probe = AmazonS3ClientBuilder.standard() .withCredentials( new AWSStaticCredentialsProvider( creds ) ) .withRegion( region ).build(); probe.drain(); // or call probe.listBuckets() and check IAM policy first if ( creds == null || accessKey == null || accessKey.isEmpty() ) throw new IllegalArgumentException( "S3 credentials not configured" );
Try / catch
try {
List<VFSRoot> locs = provider.getLocations();
} catch ( FileSystemException e ) {
Throwable root = e.getCause(); // AmazonServiceException carries errorCode
logger.error( "Bucket listing failed: {}", root != null ? root.getMessage() : e.getMessage(), e );
} Prevention
- Validate S3 connection settings with a 'Test connection' action before running pipelines
- Apply least-privilege IAM policy including s3:ListAllMyBuckets
- Use instance profiles/roles instead of long-lived keys where possible
- Monitor AWS SDK error codes in logs for early detection
When it happens
Trigger: Calling getLocations() (e.g. via a VFS root listing or the S3 VFS 'list buckets' action) when s3.listBuckets() throws: invalid/expired AWS credentials, no s3:ListBucket permission, wrong region/endpoint, or network/DNS failure.
Common situations: Misconfigured S3 connection in Pentaho/Kettle (bad access key or secret), IAM user without ListAllMyBuckets permission, VPC without internet/NAT access, or AWS outage throttling the request.
Related errors
- FileSystemException wrapping KettleFileException
- FileSystemException wrapping SdkClientException
- vfs.provider/copy-file.error
- vfs.provider/copy-missing-file.error
- vfs.provider/create-file.error
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/cbdcfe5b0af73a82.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/s3-vfs/core/src/main/java/org/pentaho/amazon/s3/provider/S3Provider.java:121
/**
* Get the list of buckets for a Vfs Connection
* @param s3Details
* @return
* @throws FileSystemException - throws exception whenever there is any exception thrown while doing the listBuckets() call
*/
@Override public List<VFSRoot> getLocations( S3Details s3Details ) throws FileSystemException {
List<VFSRoot> buckets = new ArrayList<>();
try {
AmazonS3 s3 = getS3Client( s3Details );
if ( s3 != null ) {
for ( Bucket bucket : s3.listBuckets() ) {
buckets.add( new VFSRoot( bucket.getName(), bucket.getCreationDate() ) );
}
}
} catch ( Exception e ) {
log.logError( "Exception getting the list of buckets for connection '" + s3Details.getName() + "'", e );
throw new FileSystemException( "Exception getting the list of buckets ", e );
}
return buckets;
}
@Override
public String getName() {
return NAME;
}
@Override
public String getKey() {
return S3FileProvider.SCHEME;
}
@Override public String getProtocol( S3Details s3Details ) {
return S3FileProvider.SCHEME;
}
View on GitHub (pinned to f3058517a1)