appsmithorg/appsmith · error · AppsmithPluginException
PE-ARG-5000
PE-ARG-5000
Error message
Appsmith server has encountered an unexpected error when establishing connection with AWS S3 server. Please reach out to Appsmith customer support to resolve this.
What it means
Argument error (`PLUGIN_EXECUTE_ARGUMENT_ERROR`, PE-ARG-5000) from `listAllFilesInBucket`: the `AmazonS3 connection` parameter is null. The connection object is built upstream from the datasource configuration (access key, secret key, region, endpoint), so a null here means connection creation silently failed. Note the message ('connection with AWS S3 server') describes the symptom even though the code classifies it as an argument error.
Source
Thrown at app/server/appsmith-plugins/amazons3Plugin/src/main/java/com/external/plugins/AmazonS3Plugin.java:171
S3ErrorMessages.FILE_CONTENT_FETCHING_ERROR_MSG);
}
ArrayList<String> result = new ArrayList<>();
List<S3ObjectSummary> objects = objectListing.getObjectSummaries();
for (S3ObjectSummary os : objects) {
result.add(os.getKey());
}
return result;
}
/*
* - Exception thrown by this method is expected to be handled by the caller.
*/
ArrayList<String> listAllFilesInBucket(AmazonS3 connection, String bucketName, String prefix)
throws AppsmithPluginException {
if (connection == null) {
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, S3ErrorMessages.CONNECTIVITY_ERROR_MSG);
}
if (bucketName == null) {
/*
* - bucketName is NOT expected to be null at this program point. A null check has been added in the
* execute function already.
*/
throw new AppsmithPluginException(
AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, S3ErrorMessages.EMPTY_BUCKET_ERROR_MSG);
}
if (prefix == null) {
/*
* - prefix is NOT expected to be null at this program point. A null check has been added in the
* execute function already.
*/
throw new AppsmithPluginException(View on GitHub (pinned to 8cd9021c24)
Solutions
- Open the S3 datasource configuration and verify Access Key, Secret Key, and Region are all set and correct.
- If using a custom S3-compatible provider, check the Endpoint URL and the S3 service provider selection.
- Use the datasource 'Test' button - it exercises connection creation and surfaces the real underlying error.
- Ensure the AWS SDK / S3 driver is on the classpath of the running Appsmith instance.
Defensive patterns
Strategy: validation
Validate before calling
AmazonS3 connection = buildS3Client(datasource);
if (connection == null) {
throw new IllegalArgumentException(
"S3 connection could not be created. Check access key, secret key, region, "
+ "and endpoint URL in the datasource configuration.");
}
return s3Executor.listAllFilesInBucket(connection, bucketName, prefix); Type guard
private static boolean isUsableS3Client(AmazonS3 client) {
if (client == null) return false;
try { client.getS3AccountOwner(); return true; }
catch (Exception e) { return false; }
} Prevention
- Use the datasource 'Test' action - it constructs the client and surfaces the real failure.
- Verify Access Key, Secret Key, Region, and (for custom providers) Endpoint URL are all set.
- Ensure the AWS SDK / S3 driver class is loaded by the Appsmith instance.
When it happens
Trigger: Calling `listAllFilesInBucket` (directly or via the List Files query action) when `AmazonS3ClientBuilder` could not construct a client from the datasource - typically because credentials, region, or endpoint URL are missing/invalid, or because the S3 driver class failed to load.
Common situations: Missing or wrong AWS access/secret key in the datasource; empty region; incorrect endpoint URL for an S3-compatible provider; the S3 driver class not loaded (see `S3_DRIVER_LOADING_ERROR_MSG`); test/degraded environments where credentials were not injected.
Related errors
AI-assisted analysis of appsmithorg/appsmith@8cd9021c24 (2026-08-12).
Data as JSON: /api/errors/b81181558d434b4d.
Report an issue: GitHub.