floci-io/floci · error · AwsException
ValidationError
ValidationError
Error message
No export named ${exportName} found What it means
Raised by CloudFormationTemplateEngine while resolving Fn::ImportValue when no export with that name exists in the emulator (or the importValue resolver returned null). Cross-stack references fail at template resolution time, before any resource is provisioned.
Source
Thrown at src/main/java/io/github/hectorvent/floci/services/cloudformation/CloudFormationTemplateEngine.java:415
if (secondLvl != null) {
return resolve(secondLvl);
}
}
}
}
return "";
}
private String resolveImportValue(JsonNode node) {
String exportName = resolve(node);
if (importValueResolver != null) {
String value = importValueResolver.apply(exportName);
if (value != null) {
return value;
}
}
LOG.warnv("Unresolved Fn::ImportValue: {0}", exportName);
throw new AwsException("ValidationError", "No export named " + exportName + " found", 400);
}
}
View on GitHub (pinned to 62ff490619)
Solutions
- List current exports: aws --endpoint-url http://localhost:4566 cloudformation list-exports and compare names character-by-character.
- Deploy or fix the exporting (producer) stack first so its Outputs section exports the expected name.
- If the export was lost to a restart (memory storage), redeploy the producer stack before the consumer.
- For parameterized pipelines, pass the export name as a template parameter instead of hardcoding it, so the mismatch fails with a clearer message.
Example fix
# before (producer missing export)
Outputs:
BucketArn:
Value: !GetAtt Bucket.Arn # no Export!
# after
Outputs:
BucketArn:
Value: !GetAtt Bucket.Arn
Export:
Name: shared-bucket-arn Defensive patterns
Strategy: validation
Validate before calling
// Before deploying the consumer, verify the export exists
boolean exported = cfn.listExports(req -> {}).exports().stream()
.anyMatch(x -> x.name().equals("shared-bucket-arn"));
if (!exported) throw new IllegalStateException("Deploy producer stack first"); Try / catch
catch CloudFormationException with code ValidationError and message containing "No export named"; fail the deploy with a clear 'deploy the producer stack first' message — there is nothing to retry.
Prevention
- Deploy producer stacks before consumer stacks in pipelines
- Single-source export names as constants or parameters shared by both templates
- Assert required exports exist in a pre-deploy step
When it happens
Trigger: A template containing {"Fn::ImportValue": "some-export-name"} is deployed when no other stack in the same account/region has exported 'some-export-name' via Outputs.Exports, or the exporting stack was deleted after the consumer was written.
Common situations: Deploying stacks out of order (consumer before producer), a typo between the Outputs.Export.Name in one template and the Fn::ImportValue literal in another, or the producer stack having been deleted/recreated so the export no longer exists.
Understand the failure class
Background: ValidationError explained: why open-source libraries reject your input — file uploads, YAML manifests, unique fields, and query permissions — this error's family across 13 libraries.
Related errors
AI-assisted analysis of floci-io/floci@62ff490619 (2026-08-14).
Data as JSON: /api/errors/b7b1f7479818c7e4.
Report an issue: GitHub.