This is a learning example. Our customers use Lambda to run web and mobile backends, microservices, process streams in real time, run big data processing or ML inference workloads, and much more.
Now let's dig into some code to make this page dynamic:
Step 1: Read user input in your Lambda function
Form Submission:
Step 2: Store the input in a serverless database
Step 3: Render the content from the database
DynamoDB:
{"PK":"form","form":{"name":"Bob the Builder","location":"Somewhere building shit"},"SK":"32e5afaa-703a-425c-8767-e079b9844010"}{"PK":"form","form":{"name":"Pippa","location":"In her cottage"},"SK":"3440b35e-5a04-4ef3-a486-3519238a6d1b"}{"PK":"form","form":{"name":"The Teddies","location":"On my desk"},"SK":"6561519a-5c04-429e-bb7c-5c1263008bdf"}{"PK":"form","form":{"name":"Jason","location":"At my desk yo"},"SK":"74b04da2-1b45-483b-a694-1772e3b5a32d"}{"PK":"form","form":{"name":"It's meeeee","location":"at my desk"},"SK":"781ff0c5-83dd-43c9-8ad9-4441d5fc9889"}{"PK":"form","form":{"name":"KiwiExpressCream","location":"Is not here"},"SK":"80e8552f-e4df-40d1-85c3-b8f794a4b1aa"}{"PK":"form","form":{"name":"Alice","location":"From work"},"SK":"8bc1822d-7f9c-4c46-9d3d-2a8dc5560e29"}{"PK":"form","form":{"name":"cprompt","location":"working hard"},"SK":"d2cca068-bacd-42c0-ac0c-504db3a55398"}{"PK":"form","form":{"name":"Jason","location":"At my desk yo"},"SK":"edfb694e-a0f7-4554-bd4b-91ca4f9393c6"}{"PK":"form","form":{"name":"Alice","location":"From work"},"SK":"ef4c3804-1672-4714-8468-aa017a0c6c34"}{"PK":"form","form":{"name":"Bob the Builder","location":"Somewhere building shit"},"SK":"f3b895e2-8570-43a2-8044-e443c5e9ef34"}