OptionalcacheOmit for a service with no cache identity — no VALKEY_* is emitted.
Only the fields this helper actually emits, so a caller may spread whatever
it read off the cfx-db stack or pass a literal with just these.
Deliberately excludes auroraProxyResourceId, which is for
grantWorkloadDataAccess, not for a runtime env var — requiring it here
would make every call site pass a value it does not use.
auroraProxyReaderEndpoint is the optional third: passed, it is emitted as
DB_RO_HOST for a workload that routes read paths onto the replica.
The literal Postgres role, e.g. swap_api_rw.
A plain string, never a reference to a resource: the matching
AuroraWorkloadUser is declared in the cfx-db stack (only that stack runs
in-VPC and can reach Aurora), so a reference here would be a cross-stack
dependency on a resource this program cannot see. AuroraWorkloadUser
echoes its workloadName back verbatim as the username, so the string and
the role cannot disagree as long as they are spelled the same.
OptionalmaintenanceMAINTENANCE_SERVICE_ID, defaulting to cfx-<appName>. Pass false for
a function that is not independently maintenance-gated.
OptionalusesSet IDEMPOTENCY_TABLE_NAME. Pair it with usesIdempotencyTable on the
LambdaApp, which grants the DynamoDB access this name implies.
OptionalvalkeyValkey AUTH username, when it is not appName. A package that runs two
functions off one bundle gives each its own cache identity, e.g.
reward-events alongside reward-api.
Package name without the
cfx-prefix, e.g.swap-api.