Open the Lambda console and choose Create function.
Chat-Proxy.
Expand Additional settings:
FCJ-ChatApp-Lambda-Role.
On the Code tab, replace the content of index.mjs with the code of v3/Lambda/Chat-Proxy.mjs. Change <your bucket name> to your bucket and choose Deploy. You can also deploy it from CloudShell:
mkdir -p ~/fn && cd ~/fn
sed "s/<your bucket name>/$BUCKET/" ~/ws2-chatapp/v3/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
data/conversations.json from your bucket.
Open the Test tab, create an event named Get-Data-From-S3 with the JSON {}, choose Save, then Test.
statusCode 200, and the body contains the two conversations from S3.