Zambdas Secrets

If you need to store secrets, ZapEHR has endpoints for managing them, and secrets are available inside of Zambdas. Secrets can also be useful if you have multiple environments, and want to have different values for these environments.

Zambdas automatically receive secrets in input. Here is an example:

export interface Secrets {
  [secretName: string]: string;
}
 
export interface ConfirmationEmailInput {
  email: string;
  appointmentTime: string;
  secrets: Secrets | null;
}
 
export const index = async (input: ConfirmationEmailInput): Promise<APIGatewayProxyResult> => {
  const { email, appointmentTime, secrets } = input;
  ...
}

This code includes the secrets passed to the Zambda.