sec://aws/... works out of the box because aws is a default alias — but you
can register whatever names you like.
.env
Default aliases
Passing your own
providers map replaces these entirely — include any defaults
you still want.
A note on AWS profiles
Multiple aliases pointing at different AWS accounts each depend on their own credentials being valid. With SSO that means a live session per profile, and they expire independently. When one lapses, SecRefs names which alias failed:aws sso login to run.
Using aliases from the CLI
Drop asecrefs.config.json at your project root. secrefs run finds it from
any subdirectory, the way git does.
secrefs.config.json
aws-prod and aws-staging almost certainly does not
want a third, differently-configured aws still quietly resolving — that is how
a reference reaches the wrong account.
The CLI prints which config it loaded, because “which config am I actually
using” is the first question when an alias resolves somewhere unexpected:
Service identity lifetime
When an application authenticates to a SecRefs control plane rather than using ambient credentials, it does so as a service identity. Those can be given a lifetime:expiresInDays and the identity never expires — which is the default, and
is what every identity created before this existed still has.
The console shows each identity’s expiry alongside when it was last used.
The second is usually the more useful of the two: a token rotated on schedule
was never the risk. The one nobody has touched in eight months is.