---
# System prepended metadata

title: Untitled

---


eventId : 321

2 students (Leon, Kangleng)

Leon --> landing page (first person so no students created yet)

1. query attendance table (eventId-StuedentId) --> no result found
2. Probably first student to attend
3. query events table by eventId (grab event) --> check time matches eventTime, check student is in studentList
4. if above yes, create a new row for each student in that list (with conditional put), mark only true for that student
5. Kangleng logs to landing page --> go back to 1, we find result for Kangleng, we validate time still within event window and we update his attendance it to true. 

6. Concern if Kangleng and Leon  log in same time.. racing will happen in number 1, 2, 3, up to 4, but lets say Leon success to Put item first, so Kangleng conditional Put fails, which means the recovery case for this is to check number 1 again


2 things that we need

1. conditional update
2. limit the attendace list population function to concurrency = 1
3. use aws javascript sdlk

aws.lambda.invoke('fjekwfjlekwj')

https://www.serverless.com/blog/aws-lambda-provisioned-concurrency