Business rules for grant scoring are tangled with AWS SDK calls inside one Lambda handler, making unit tests slow and brittle. What structural change helps?
Select an answer to reveal the explanation.
Short Explanation
Keep the brains of grant scoring in plain functions you can test on a laptop, and let the handler be the thin adapter that talks to AWS. Mixing SDK spaghetti into every rule makes unit tests cry.
Full Explanation
A common Lambda structure isolates domain logic from the handler adapter that parses events and calls AWS APIs. Pure scoring functions can then be unit-tested without credentials or networked SDK calls, while integration tests cover AWS boundaries. Production-only testing or embedding logic in alarm text does not improve testability.