provision or keep running Event AWS Lambda runs your handler Result / Effect • AWS invokes the function when its trigger fires A managed compute service for running code in response to events. • You provide code + configuration; AWS manages execution Serverless ≠ no servers. It means you do not manage the servers. • Functions should be small, focused, and stateless between invocations Lambda runs the code that handles the request. 6 4
GetCurrentTemperature Java 21 API Gateway • Lambda contains the code that reacts to an event. • API Gateway gives the Lambda an HTTP/REST-style entry point. • The route decides which Lambda integration receives the request. Client → HTTP GET → API Gateway → Lambda handler → JSON response 7
Lambda integration JSON response 13 • The route is the public HTTP shape; the integration is the backend Lambda • Method: GET • Path: /temperature/current • Integration: GetCurrentTemperature Lambda • Stage: default • Automatic deployment: enabled
CI Test 3. Cloud Test 4. End-to-End local • fast • JUnit GitHub • mvn test deployed Lambda real event path Debugging should happen in levels 1–2 Do not make AWS the first place you discover a bug.. 17 CSC 5100 • Software Engineering 10
Lambda Actual Result PASS / FAIL Known Test Event After merge, automation can invoke the real cloud function with a known event. This verifies packaging, deployment, runtime configuration, and invocation. 20 CSC 5100 • Software Engineering 14
pytest mvn test / pytest GitHub Branch + commit Push + Pull Request GitHub Actions AWS Run tests automatically Build deployment artifact Deploy Lambda API Gateway invokes it. 1 • Develop & unit test 2 • Review & verify 3 • Deploy & integrate Fast feedback. No web server. No AWS credentials needed. PR is the gate. Actions repeat the tests in a clean environment. After merge, the workflow deploys. Then test the real HTTP endpoint. Your IDE does not need to deploy directly to AWS. Deployment flow through GitHub Actions after the PR is accepted. 21 CSC 5100 • Software Engineering 24
GitHub Actions AWS Lambda You do NOT need individual AWS accounts for this lab. AWS credentials stay with the deployment workflow—not in the developer code. AWS is centralized; development stays in the workflow you already know. 23 CSC 5100 • Software Engineering 8
is simply another deliverable in the project. • Story describes the cloud behavior ├── src/test/java/... └── lambda/ └── temperature/ ├── pom.xml • Tasks divide implementation/testing work ├── src/main/java/ • PR is reviewed exactly as before │ └── .../TemperatureHandler.java └── src/test/java/ └── .../TemperatureHandlerTest.java • Merge is the deployment gate • Same Git workflow. New execution environment. 24 CSC 5100 • Software Engineering 9
2026 Copyright. These slides may be used only as study material for CSC 5100 within the California State University system. They may not be distributed or used for any other purpose.