Interactive command. At a TTY,
fjall target set with no name walks an
account picker and a region picker, and fjall target list /
fjall target get render the active target’s detail card. Pass
--non-interactive for plain-text output. Naming a target sets it directly
either way.Overview
A target is a deployment destination: one connected AWS account paired with one of your organisation’s configured regions. The active target decides wherefjall deploy lands, which credentials fjall aws exec mints, and which account fjall secrets reads and writes in.
Each takes --target <name> to address a different one for a single command. fjall secrets gained the flag in fjall 38. aws exec and secrets also accept the -t short form, which deploy does not.
Targets are derived at runtime from your organisation config, which Fjall fetches from the API. Accounts, regions and role ARNs are never authored by hand in a repository file. See Understanding Profiles for how a target becomes an AWS profile.
Prerequisites
fjall target get reads the local active target first, so it still names the target when the organisation config cannot be fetched. With --non-interactive, that name is on stderr as Active target: <name>, followed by (Could not fetch organisation config for details) instead of the account and region. Nothing reaches stdout on that lane, and the command still exits 0.
Usage
Bare
fjall target dispatches to list.
Every subcommand also accepts -v, --verbose, --non-interactive, and the agent-output flags --agent, --budget <level>, --fields <list> and --full. See Agent mode.
Target names
A target name is the lowercased account name followed by an abbreviated region:southeast is se, northeast is ne) and so does south (so), which keeps ap-south-1 and ap-southeast-1 apart.
Asia Pacific target names changed in fjall 32.
ap-southeast-*,
ap-northeast-*, ap-south-*, af-south-1, eu-south-* and me-south-1
previously abbreviated to a single direction letter, which gave
ap-southeast-1 and ap-south-1 the same name. A target name using an old
code is refused with the replacement to use, never resolved to a region you
did not name. Run fjall target list for the current names, then
fjall target set <name> to re-point. Every other region is unaffected.acme-prod-use1 is the account acme-prod in us-east-1.
How the list is derived
Fjall crosses every connected account with every configured region:- Accounts: every connected account except the organisation (management) tier. Platform-tier accounts are included.
- Regions: your organisation’s primary region, its secondary regions, and its disaster recovery region.
- Order: environment, then account name, then region.
List targets
▸ marker and a bold name.
Readiness annotations
fjall target list probes each target and annotates the row. The probe is advisory: it never fails the command.
The IPAM pool is only part of the check for an organisation that has a management account. A solo connected account is judged on its stack alone.
When some targets could not be probed, the output closes with a dim
Readiness not checked for 1 of 2 targets: no AWS session line. Deploy the missing stack with fjall org deploy, or fjall account deploy when your organisation has no management account.
Empty results
The second case is not an error. Run
fjall target set and pick a region: selecting one adds it to your organisation’s regions.
Show the active target
TARGET=$(fjall target get --non-interactive) captures just the name.
With no active target, the command prints No active target set. Use 'fjall target set <name>' to set one. on stderr, writes nothing to stdout, and still exits 0.
If the recorded name no longer resolves to a connected account, the status is stale and the output carries Target no longer exists in organisation config. That happens when the account was disconnected, renamed, or promoted to the organisation tier. Run fjall target set again.
A name Fjall cannot resolve stays off stdout. The detail lines are replaced by Active target: <name> and the reason, both on stderr.
Set the active target
Naming a target sets it directly, at a TTY or not. Run
fjall target set with
no name to choose the account and region from pickers instead.Options
Choosing a region your organisation has not registered
Target names are resolved against every AWS region, not only the configured ones. Setting a target in an unregistered region therefore has a side effect: the region is written back to your organisation config, where it becomes available to every account and is included in organisation deploys. Fjall never does that silently.- Interactive
- Non-interactive
The region picker lists your configured regions plus an Other region… row. Picking an unregistered region raises a confirmation before anything is written:Confirming prints
Adding eu-west-1 to your organisation's regions..., then the usual confirmation card.Running outside a Fjall project
The active target is stored per checkout, sofjall target set needs a project to anchor it to. With no fjall-config.json in the current directory or any parent, the command refuses rather than planting a stray config:
fjall/<app>/infrastructure.ts layout is exempt, because its first target set legitimately writes the project’s first config.
Readiness after a set
Once the target is saved, Fjall probes it and prints one line:
The unready line is a full sentence, for example:
Where the active target is stored
fjall target set writes activeTarget to .fjall/local.json, a git-ignored file beside fjall-config.json. The choice is per developer and per checkout, so a colleague’s target and a CI pipeline’s never inherit yours.
Agent output
--agent emits structured records for all three subcommands.
target get reports status as active, stale or none. target list also carries a totalCount aggregate and the active target’s name.
The single-record blocks (target get and target set) name the target
target, the same spelling every command accepts it under as --target, so
an answer can be passed straight back. target list keeps name: each row
is a target, so the identifier is the row’s own property.
A --fields projection naming name on target get or target set fails with VALIDATION_ERROR before the command runs. The error names name as unknown and lists that command’s valid fields, which are the default and extra fields of its row above.
Name target instead. fjall target list --fields name is unchanged.
Handling failures
Next Steps
Understanding profiles
How a target becomes an AWS profile, and how a deploy resolves its account.
Run AWS commands
Use
fjall aws exec --target <name> to run any AWS command with minted credentials.Deploy an application
Ship an application to the active target.
Connect an account
Add the AWS accounts that targets are derived from.