Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.38 KB

0005-bundling-environment-variables.md

File metadata and controls

33 lines (21 loc) · 1.38 KB

5. Bundling Environment Variables

Date: 2023-02-22

Status

Accepted

Amended By 9. No more need to bundle environment variables

Context

Architect allows us to define environment variables using AWS SSM Parameter Store. This is a great way to manage environment variables, but it has a few drawbacks:

  • It requires a separate AWS access
  • It hides the environment variables from the developers and the CI system
  • It sets the environment variables for the lambda function, but not for the bundling process
  • A lambda function with environment variables cannot be distributed to Lambda@Edge locations

Decision

We're going to bundle the environment variables into the lambda function using esbuild at remix build time.

Consequences

Our bundled code will be 100% self-contained and will not require any external dependencies or control. This also means that any change in the configuration will require a new build and a new deployment.