ai.internal._aws_resolve_region

(internal) Resolves the AWS region: `region` when set, else `AWS_REGION`, `AWS_DEFAULT_REGION`, or the active profile's `region` key.

Reference version

Signature

function ai.internal._aws_resolve_region(region: string | null, profile: string | null) -> string | null

(internal) Resolves the AWS region: region when set, else AWS_REGION, AWS_DEFAULT_REGION, or the active profile's region key.

Discovery is best-effort and never fails.

Returns

The region, or null when it is not discoverable.

Source:<builtin>/ai/ns_internal/auth.bamlbytes 37793892