Phiên bản v7 của Chat-Proxy đọc cuộc trò chuyện từ DynamoDB và lưu tin nhắn mới khi trình duyệt gửi POST /conversations/{id}.
Deploy code mới và gọi API:
cd ~/fn && cp ~/ws2-chatapp/v7/Lambda/Chat-Proxy.mjs index.mjs && zip -q proxy.zip index.mjs
aws lambda update-function-code --function-name Chat-Proxy --zip-file fileb://proxy.zip --query LastUpdateStatus --output text
sleep 5; curl -s $API_URL/conversations; echo; curl -s $API_URL/conversations/1; echo
v7/Lambda/Chat-Proxy.mjs vào console rồi chọn Deploy.GET /conversations và GET /conversations/1 giờ trả dữ liệu từ DynamoDB.
Upload website v7, bản này có thêm chức năng gửi tin nhắn:
cd ~/ws2-chatapp && aws s3 sync v7/Site s3://$BUCKET --exclude '*desktop.ini' --only-show-errors
Mở chat.html#1, nhập tin nhắn rồi chọn Send.

Trong console DynamoDB, mở Explore items và chọn Chat-Messages.
Student đã nằm trong bảng.
Người gửi luôn là Student vì code chưa biết người dùng là ai. Phần 6 sẽ sửa bằng Cognito.