Remember to update the function name and the id of user with Nguyen Van Dong
name.
Run
aws lambda invoke \
--function-name arn:aws:lambda:ap-southeast-1:971422684006:function:update-user \
--cli-binary-format raw-in-base64-out \
--payload '{ "id": "6c539686-de1c-4bef-85ef-f68a4b5aabe0", "name": "Nguyen Van Tay" }' \
response.json
Check the response
cat response.json
{"statusCode": 200, "headers": {"Content-Type": "application/json", "Access-Control-Allow-Origin": "*"}, "body": "{\"updated_at\": \"2025-05-14T10:45:09\", \"created_at\": \"2025-05-14T10:07:42\", \"email\": \"nguyenvandong@gmail.com\", \"id\": \"6c539686-de1c-4bef-85ef-f68a4b5aabe0\", \"name\": \"Nguyen Van Tay\"}"}%
To verify that the user is updated, you can
list-users
again.