A SAM project for a county records API packs unit tests, Markdown docs, and multi-gigabyte sample media into the same directory that becomes the deployment bundle. What should the team change?
Select an answer to reveal the explanation.
Short Explanation
Deployment packages are not attic storage. Keep tests, docs, and giant sample scans out of the SAM packaging path so uploads stay lean and cold starts stay sane. Timeout hikes and stuffing media into source just paper over a bad layout.
Full Explanation
SAM packaging for a county records API should include only runtime code and required dependencies, excluding unit tests, Markdown docs, and multi-gigabyte sample media from the deployment bundle. Domain 3 packaging skills include organizing directory structure so build and package steps ship only what the Lambda runtime needs. Bloated municipal bundles slow uploads, risk size limits, increase cold-start payload costs, and ship unnecessary files into production execution environments where they add no citizen-facing value.
Keeping everything in one folder and raising Lambda timeout to absorb slower uploads fails because timeouts do not fix package boundary or size problems and can mask slow deploys as runtime issues. Uploading a bloated bundle once and relying on layers for all future changes fails conceptually if the primary package remains incorrectly scoped and still carries tests or media. Moving sample media into the handler as base64 strings fails by inflating code and memory without solving packaging hygiene.
Exam caveat: exclude patterns must be verified in the built artifact—gitignore alone does not always equal SAM package contents. Operational check: unzip or inspect the packaged artifact in CI, assert tests, docs, and sample media are absent, fail the build on unexpected large files, and track package size trends for the records API.