When this becomes useful
An action in one part of the product needs to start work elsewhere. An event boundary lets each side evolve, provided the event contract and failure handling are clear.
What the template offers
API cache invalidation with events is a AWS example pattern from AWS Serverless Patterns. It offers a concrete implementation to inspect and adapt. A starting point when an event needs to make cached data fresh. Define the consistency window your product can tolerate.
Technical shape
Inspect the event that triggers invalidation and the API cache settings. Check the delay between a source update and a fresh response.
Questions worth answering
- Who owns the event schema?
- What happens when consumers fail?
- Can an event be replayed safely?
Inspect the source
Read the maintainer's README, license, setup instructions and current repository state before adapting the code.
Open AWS Serverless Patterns