Skip to main content
Complete one of:

Overview

Authentication and the choice of which AWS account a deploy lands in are two separate concerns in Fjall. Neither is driven by a manual profile step or by a stage mapping in fjall-config.json. Profiles are never authored by hand. There is no fjall profile command. Fjall fetches your organisation config from the API and derives every profile from it.

Authentication modes

Fjall supports two authentication modes, both derived from the same organisation config.
  • Account mode. You connected a single AWS account with fjall connect. The account carries its own OIDC role, so Fjall assumes that role directly. No ~/.aws/config entries are needed.
  • Organisation mode. You deployed a multi-account organisation with fjall create organisation. Non-root member accounts authenticate via AWS SSO through the root account’s IAM Identity Centre. Fjall derives one SSO profile per account and region.
OIDC is preferred whenever an account carries its own oidcRoleArn. SSO applies to organisation members that lack their own OIDC role. The rest of this page covers organisation-mode profile derivation and target selection. In account mode, authentication is automatic via OIDC and you do not manage profiles or targets.

How profiles are derived

Fjall derives profiles from your organisation config with deriveProfiles(orgConfig). The org config (accounts, regions, OIDC roles, SSO sessions) is fetched from the API, not read from any local file. Two rules apply: The region abbreviation collapses an AWS region to a short token: us-east-1 becomes use1, us-east-2 becomes use2, eu-west-1 becomes euw1. SSO profiles use the sso-<rootname> session from your organisation config and the AdministratorAccess role.

Inspecting profiles in ~/.aws/config

Organisation-mode SSO profiles are written to your ~/.aws/config file. Inspect them directly:
After deploying your organisation, the file contains entries like this (for an organisation named exampleorg):
If your SSO session has expired, Fjall prompts you to authenticate through your browser at deploy time:
SSO login prompt SSO login prompt.

Selecting a deployment target

In organisation mode, the active deployment target decides which account and region a deploy lands in. A target is an account and region pair with a canonical name, <accountname>-<regionabbrev>, for example production-us-use1. Root accounts are excluded from the target list. Manage targets with the fjall target command:
fjall target set validates the name against the derived targets and persists it as activeTarget in your fjall-config.json. At deploy time, Fjall resolves the account in this order:
  1. A per-deploy --target <name> flag wins, if present.
  2. Otherwise the activeTarget from local config is used. If exactly one target exists, Fjall selects it silently. If several exist and none is active, Fjall errors and asks you to run fjall target set.

The environment flag is not a target selector

fjall deploy accepts an optional -e, --environment <env> flag, but it does NOT select an account or region.
This value is a free-form CI/CD label. It flows through to the CDK synthesis as a context value (-c environment=<env>). It plays no part in profile or target resolution. To choose the deploy account, use fjall target set or the --target flag.

What fjall-config.json contains

fjall-config.json is governed by a strict schema and holds exactly two optional fields:
There is no deploy mapping, no environments block, and no stage field. Account, region, OIDC, and SSO data lives in your organisation config, which Fjall fetches from the API and injects into the deploy. It is never stored in fjall-config.json.

Next Steps

Deploy Platform

Deploy your platform account in organisation mode.

Deploy Application

Deploy an application to your selected target.

Deploy Organisation

Set up a multi-account organisation.

Connect AWS Account

Connect a single account in account mode.