Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC510 Lecture 12

Avatar for Javier Gonzalez-Sanchez Javier Gonzalez-Sanchez PRO
September 29, 2026
32

CSC510 Lecture 12

AWS Lambda + CICD
(20260925)

Avatar for Javier Gonzalez-Sanchez

Javier Gonzalez-Sanchez PRO

September 29, 2026

Transcript

  1. CSC 5100 Modern Software Engineering Lecture 12. AWS Lambda +

    GitHub Actions CI/CD Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.info ffi o ce: 14 -227
  2. AWS Lambda API Gateway Domain GitHub OIDC 12 pre-created functions

    6 GET + 6 POST routes api.javiergs.phd temporary AWS auth • Summary: provision once, deploy many times. • Each of your Lambda initially returns: `Student Lambda not deployed yet`. • GitHub will update existing `csc5100-*` Lambdas after merge. 4
  3. Start with working infrastructure, not an empty AWS account •

    Added the AWS L mbd J v dependency nd M ven Sh de plugin to the sh red `pom.xml`. • Cre ted `Temper tureL mbd ` s the reference implement tion nd JUnit tests s the reference test structure. • Cre ted 12 L mbd functions nd 12 API G tew y routes. • Con igured the public dom in ` pi.j viergs.phd`. • Con igured GitHub Actions to uthentic te to AWS with OIDC (OpenID Connect) nd deploy ccepted code. a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a f f a a 5 a • Pl ced working pl ceholder in every student L mbd until your implement tion is merged.
  4. Example: TemperatureLambda.java • RequestHandler<...> gives AWS a Java entry point.

    • handleRequest(...) receives the request and creates the response. • convertTemperature(...) contains the focused business logic. • Your Lambda follows the same idea: adapter + small operation. 8
  5. Example: Tests • Your tests live under `src/ test/java` in

    a package matching your Lambda. Reference:TemperatureLambdaTest • Normal case: Fahrenheit → Celsius. • Another valid case: Celsius → Fahrenheit. • Invalid case: unsupported conversion. • Your assignment requires at least 3 JUnit tests: normal, boundary, invalid. 9
  6. Run the Tests Before GitHub • You should know your

    code works locally before opening a Pull Request. • Run the JUnit class directly in your IDE • Then run the complete Maven build: mvn clean package • Maven compiles, runs tests, and creates the shaded JAR. 10
  7. Your Starting Point First time: clone `CSC-Sandbox/5100-requirements` and open it

    as the Maven project. Already cloned: update/pull `main` before creating your work branch. Do not work directly on `main`; create a branch for your Lambda Lab work. 12
  8. What You Will Find in the Repository Start with your

    README. It tells you exactly what belongs in your two Java folders. 13
  9. GET Assignments 14 aidenrodriguez EncryptMessageLambda /5100/encrypt paulmotter RobotDistanceLambda /5100/robot-distance edgarddragde

    RobotReachabilityLambda /5100/robot-reachability hwrd22 DataFreshnessLambda /5100/data-freshness dylangururajan CoordinateNormalizerLambda /5100/coordinate-normalizer wliu4040 EventRateLambda /5100/event-rate
  10. POST Assignments 15 jjuangon03 GazeClusterLambda /5100/gaze-clusters adrian0427 DominantAffectLambda /5100/dominant-affect oxlojalencas

    NearestSampleLambda /5100/nearest-sample briggsmurphy LidarClosestLambda /5100/lidar-closest ejiswkrosmew LidarSafetyLambda /5100/lidar-safety daome MovingAverageLambda /5100/moving-average
  11. a a a a a a a a a a

    a a a a a a a a a a a a a a a a 16 a • Find your ssignment: l mbd l b/<your-github-id>/README.md • Review your README requirements: • Cl ss n me nd J v p ck ge • GET or POST route • Input nd output JSON/p r meters • V lid v lues nd required HTTP 400 beh vior • Expected source nd test p ths • Deployment test: browser for GET, curl for POST • Review my Temper tureL mbd ex mple nd comp re its structure with your ssignment • Implement your L mbd a a Read Your README Before Coding
  12. Before You Push: Local Check • Run your JUnit tests.

    • Run mvn cle n p ck ge • Do not worry bout the M ven Sh de overl p w rnings shown here; the import nt result is `BUILD SUCCESS`. a a a a a a a a a a 17 a • Fix compil tion/test f ilures before pushing.
  13. Then: Commit → Push → Pull Request • Commit →

    push → cre te PR • The PR is your submission nd the CI checkpoint. • PR title: `L mbd L b - <L mbd N me> - <GitHubID>`. • GitHub Actions runs `mvn cle n p ck ge` on the Pull Request. • No AWS deployment h ppens from your br nch. a a a a a a a a a a a a a a 18 a • Address review comments until the PR is green nd pproved. •
  14. After Instructor Merge: Deployment Is Automatic • After merge: deploy

    to AWS → test the endpoint → verify • GitHub detects your ch nged p ck ge nd deploys only your ssigned L mbd . • GET → open the ex ct URL from your README in browser. a a a a a a a a a a a a a a 19 a • POST → run the ex ct curl comm nd from your README in IntelliJ Termin l (or cre te be tiful HTML form 🙂)
  15. CSC 5100 Modern Software Engineering Javier Gonzalez-Sanchez, Ph.D. [email protected] Fall

    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.