Overview
Every deploy records a release: the image tag that went live for each service, the git commit and branch it was built from, and a monotonically increasing release number. Two commands work with that history:
A rollback is a code-only operation. It re-registers each service’s task definition (or republishes the Lambda function) against images that already exist in ECR, then rolls the services. Nothing is rebuilt and your infrastructure is not re-synthesised.
Prerequisites
fjall releases reads the Fjall API only, so it works from any directory. fjall rollback deploys, so it runs from the project.
List Releases
A
(rollback) suffix marks a release that restored an earlier one.
Fjall derives image tags as <serviceName>(-<target>)?-sha-<12 hex digits>, so an api service built from digest sha256:ab12cd3f9e01… gets the tag api-sha-ab12cd3f9e01.
Options
JSON Output
nextCursor carries the last returned release number and is present only when more releases exist. Pass it back as --cursor to fetch the next page.
Roll Back
--non-interactive skips it, and so does any invocation whose stdout is not a terminal, such as a pipe, a redirect or a CI job. Gate the command upstream in a pipeline.
Options
What a Rollback Does and Doesn’t
- Does register a fresh task-definition revision per service pinned to the target release’s recorded image tag, then roll each ECS service. Container-image Lambda functions are updated and republished the same way.
- Does reconcile the Compute stack’s
<Service>ImageTagparameters afterwards, so the next full deploy does not silently revert the rollback. - Doesn’t build or push an image, run migrations, or synthesise and deploy your infrastructure. Only the running code moves.
Rollback Window
Fjall protects the AWS artefacts (ECR images and task definitions) referenced by the 25 most recent releases. Older releases still appear in the history, but their images may have been pruned and are no longer guaranteed to be rollable.--to resolves against the 100 most recent releases. If the number is outside that page, the CLI lists the release numbers it did find rather than guessing.
Refusals
fjall rollback fails closed before touching AWS when:
When the target release’s infrastructure assembly digest differs from the current release’s, the CLI prints a warning before the prompt: an image rollback does not restore infrastructure changes made since that release.
A rollback cancelled at the prompt applies nothing. A rollback stopped by a remote cancel or an approval gate exits with code
2, which means “stopped by decision”, not “failed”.
One outcome is not a refusal. When service discovery finds no ECS services and the manifest in <app>/cdk.out lists no container-image Lambda functions, the rollback applies nothing, still reports success, and exits with code 0:
[warn] line is the verdict, not the success line that follows it.
From fjall 38 an application name containing a hyphen resolves its ECS services correctly. Through fjall 37 a hyphenated name matched no …DeployableService export at all, so a rollback rolled only the application’s container-image Lambda functions, and landed here when it had none.
Agent mode
Neither command has an agent output surface. Writing--agent, --budget, --fields, or --full on the command line is refused before the command runs, with an error naming the alternative:
fjall releases, use --json.
fjall rollback has no machine-readable output at all. Run it without the flag, read the exit code, then confirm the active release with fjall releases <app> --json.
Next Steps
fjall rollout
Restart running services in place so rotated secrets take effect, with no
image change.
fjall deploy
Build and deploy a new release to AWS.
fjall build
Build and push a service image without deploying it.
Deployment safety
Approval gates, plan mode, and the guards around a risky deploy.