Overview
A registration service reports rejected submissions even though its cloud function appears healthy. Reproduce the discrepancy, investigate logs, and prepare a concise incident report with evidence. This is an observability project, not a live student registration service.
Architecture
Synthetic test events invoke Lambda. Its execution role permits writing logs to CloudWatch. Logs Insights filters business outcomes while Lambda service metrics describe function execution.
![]()
Prerequisites
- Complete Investigate a failed registration with Lambda logs.
- A learning account and permission to create/query/delete the lab resources.
- Basic familiarity with Python and JSON.
Steps
1. Create your baseline
Follow the prerequisite lab to deploy the sample validation function. Keep a copy of the code and record which inputs it accepts. If you cleaned up already, follow the creation steps again.
2. Generate a controlled incident
Invoke three valid events with different demo- IDs and two invalid events, one with an incorrect prefix and one with no studentId. Keep the exact input and result for each invocation. Do not include real IDs.
3. Find the rejected requests
Use the lab's Logs Insights query with a time range covering only your five invocations. You should find two rejection events. Compare the function invocation count, unhandled error count, and application rejection count. Explain why these are different measures.
4. Explain and improve the behavior
The current validator accepts any string beginning with demo-, including demo- by itself. Add a requirement for at least one character after the prefix. Test demo-001, demo-, a missing value, and a numeric value. Keep a before-and-after result table. The expected acceptance policy must be explicit in your report.
5. Write the incident report
Document symptom, affected test requests, timeline, investigation query, root cause, code change, and regression results. Recommend a production application metric for rejected registrations and describe what an alert threshold would depend on. You do not need to provision a metric filter for this project.
Verification
- Every recorded input has an observed output.
- Two initial invalid invocations can be found in logs.
- Updated validation handles empty suffix, missing input, and non-string input without an unhandled exception.
- Your report distinguishes invalid business input from infrastructure failure.
Cost and cleanup
Keep log retention short and queries scoped to this function's log group and test window. Lambda, log ingestion, storage, and queries may incur charges. Delete the function, the dedicated log group, and the dedicated execution role. Check the region and confirm resources no longer exist.
