appsmithorg/appsmith · error · AppsmithPluginException
PE-DSE-5000
PE-DSE-5000
Error message
Appsmith server has failed to fetch list of buckets from database. Please check if the database credentials are valid and/or you have the required permissions.
What it means
Thrown by the datasource getStructure (schema fetch) flow when listing buckets raises SdkClientException (S3ErrorMessages.LIST_OF_BUCKET_FETCHING_ERROR_MSG, code PE-DSE-5000). Appsmith could not call S3 listBuckets, usually because the credentials are invalid, lack s3:ListAllMyBuckets, or the endpoint/region is unreachable.
Source
Thrown at app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java:1110
List<DatasourceStructure.Table> tableList;
try {
log.debug(Thread.currentThread().getName()
+ ": connection.listBuckets() called for AmazonS3 plugin.");
tableList = connection.listBuckets().stream()
/* Get name of each bucket */
.map(Bucket::getName)
/* Get command templates and use it to create Table object */
.map(bucketName -> new DatasourceStructure.Table(
DatasourceStructure.TableType.BUCKET,
"",
bucketName,
new ArrayList<>(),
new ArrayList<>(),
getTemplates(bucketName, DEFAULT_FILE_NAME)))
/* Collect all Table objects in a list */
.collect(Collectors.toList());
} catch (SdkClientException e) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_GET_STRUCTURE_ERROR,
S3ErrorMessages.LIST_OF_BUCKET_FETCHING_ERROR_MSG,
e.getMessage());
} catch (IllegalStateException e) {
throw new StaleConnectionException(e.getMessage());
}
return new DatasourceStructure(tableList);
})
.subscribeOn(scheduler);
}
private String getOneFileNameOrDefault(AmazonS3 connection, String bucketName, String defaultFileName) {
ArrayList<String> listOfFiles;
try {
listOfFiles = listAllFilesInBucket(connection, bucketName, "");
} catch (AppsmithPluginException e) {
return defaultFileName;View on GitHub (pinned to 8cd9021c24)
Solutions
- Re-enter the access key and secret key in the datasource and click 'Test configuration'.
- Grant the IAM principal s3:ListAllMyBuckets on '*' (or at minimum the bucket(s) used), plus s3:ListBucket on the target bucket.
- Correct the endpoint URL and region for non-AWS providers (Wasabi, DigitalOcean, MinIO, etc.).
- Check server-to-S3 network connectivity and NTP/clock sync on the Appsmith host.
Defensive patterns
Strategy: validation
Validate before calling
// No code-side guard can fully prevent an AWS auth/network failure, // but verify the datasource config before refreshing schema: // - access/secret key non-empty // - endpoint/region correct for the provider // Use Appsmith 'Test configuration' to validate before 'Refresh schema'.
Try / catch
// Treat as a datasource health error: catch on schema refresh, show the user // a credentials/permissions hint, and offer a re-test of the datasource.
Prevention
- Grant s3:ListAllMyBuckets (and s3:ListBucket on targets) to the IAM principal.
- Keep server clock synced (NTP) to avoid SigV4 signing failures.
- Verify endpoint URL for third-party S3 providers.
- Use 'Test configuration' before refreshing schema.
When it happens
Trigger: On the datasource schema/structure refresh, the AWS SDK listBuckets() call throws SdkClientException. Caught and rethrown as a PLUGIN_GET_STRUCTURE_ERROR. The nearby IllegalStateException branch converts to StaleConnectionException, but a hard SdkClientException surfaces this message.
Common situations: Wrong access/secret key; key lacks the s3:ListAllMyBuckets action (an IAM policy scoped to a single bucket); endpoint URL malformed for a third-party S3 provider; network/firewall blocking the S3 endpoint; system clock skew breaking SigV4 signing.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/39a66aa062a94b94.
Report an issue: GitHub.