bcgov / reserve-rec-api

For the Parks and Recreation Digital Transformation project.
Apache License 2.0
1 stars 3 forks source link

Modularize SAM Template file #37

Open Dianadec opened 4 days ago

Dianadec commented 4 days ago

Our template.yaml file contains all the stack-building instructions for our AWS SAM deployments. Because it is a single file, it can get quite large as it scales with the product size. It is good-boy code protocol to look for ways to break down large file sizes and store the information in them into their own respective modules.

AWS SAM provides a way to do this in the form of application nesting, however, it has limited support for our application structure. Namely, it cannot have references to the same RestApi resource in multiple files, which means our Lambda instructions cannot be separated in different files. Lambda instructions make up the majority of the template, so the inability to separate these instructions makes application nesting pretty useless.

There are two workarounds we could investigate:

The longer we wait to do this, the bigger our template.yaml gets, and the more work it is to change the file structure when it gets to be too much.

Acceptance Criteria:

Development Checklist:

Dependencies

Relevant documentation as reference

Definition of Ready

Definition of Done

Notes: