floci-io/floci · error · AwsException
InvalidAction
InvalidAction
Error message
Action {} is not supported What it means
Returned by the Athena emulator's JSON handler when the X-Amz-Target action (or equivalent routing key) is not one of the supported Athena operations. It signals an UnrecognizedOperationException-style gap in the emulator with code InvalidAction and HTTP 400.
Source
Thrown at src/main/java/io/github/hectorvent/floci/services/athena/AthenaJsonHandler.java:108
}
case "GetTableMetadata" -> {
String catalog = request.has("CatalogName") ? request.get("CatalogName").asText() : AthenaService.DEFAULT_CATALOG;
String database = request.path("DatabaseName").asText(request.path("Database").asText(""));
String tableName = request.get("TableName").asText();
yield Response.ok(Map.of("TableMetadata", athenaService.getTableMetadata(catalog, database, tableName))).build();
}
case "DeleteWorkGroup" -> {
String wg = request.path("WorkGroup").asText(null);
if (wg == null || !wg.matches("[a-zA-Z0-9._-]{1,128}")) {
throw new AwsException("InvalidRequestException", "WorkGroup is required.", 400);
}
if ("primary".equals(wg)) {
throw new AwsException("InvalidRequestException", "The primary workgroup cannot be deleted.", 400);
}
athenaService.deleteWorkGroup(wg, region);
yield Response.ok(Map.of()).build();
}
default -> throw new AwsException("InvalidAction", "Action " + action + " is not supported", 400);
};
}
}
View on GitHub (pinned to 62ff490619)
Solutions
- Verify the action name is spelled exactly as the AWS API defines (case-sensitive) if calling manually.
- Check the emulator's AthenaJsonHandler switch for the list of implemented actions and use only those.
- Update the Floci emulator to the latest version — new Athena actions may have been added.
- If the action is genuinely missing, open an issue/PR adding the case to AthenaJsonHandler.
Example fix
// before POST / HTTP/1.1 X-Amz-Target: AmazonAthena.StartCalculationExecutions // after (use a supported action) POST / HTTP/1.1 X-Amz-Target: AmazonAthena.StartQueryExecution
Defensive patterns
Strategy: fallback
Validate before calling
// Check against the emulator's supported action set before calling new Athena APIs
static final Set<String> SUPPORTED = Set.of("StartQueryExecution","StopQueryExecution","GetQueryExecution",
"GetQueryResults","ListQueryExecutions","CreateWorkGroup","DeleteWorkGroup","GetWorkGroup",
"ListWorkGroups","ListTableMetadata","GetTableMetadata");
static boolean isSupported(String action) { return SUPPORTED.contains(action); } Try / catch
try {
return dispatch(action, request);
} catch (AwsException e) {
if ("InvalidAction".equals(e.getCode())) {
throw new UnsupportedOperationException("Athena action not emulated: " + action, e);
}
throw e;
} Prevention
- Pin your AWS SDK/CLI version in CI so new Athena actions don't surprise the emulator.
- Smoke-test the exact Athena calls your app uses against the emulator in CI.
- Contribute missing actions upstream rather than forking request formats.
When it happens
Trigger: Calling any Athena API the emulator has not implemented — e.g. StartCalculationExecution, ListEngineVersions, or a newly introduced AWS Athena action — through a current AWS SDK/CLI version.
Common situations: SDK version drift: upgrading the AWS SDK or CLI to a version that emits newer Athena actions while the emulator build lags behind; hand-rolled HTTP clients with a typo in the X-Amz-Target header.
Related errors
- InvalidRequestException
- InvalidRequestException
- BadRequestException
- ResourceInUse
- InstanceRefreshInProgress
AI-assisted analysis of floci-io/floci@62ff490619 (2026-08-14).
Data as JSON: /api/errors/b2b11ac8cf5fdf30.
Report an issue: GitHub.