From 40928108ce6016d30c05495d47a502372f7aecd1 Mon Sep 17 00:00:00 2001 From: Andy Bette Date: Tue, 20 Feb 2024 16:59:00 -0500 Subject: [PATCH] simplified the answer to the exercise there's no need for --expression-attribute-names. I also added return-values to demonstrate that the command behaves as expected. --- content/hands-on-labs/explore-cli/cli-writing-data.en.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/hands-on-labs/explore-cli/cli-writing-data.en.md b/content/hands-on-labs/explore-cli/cli-writing-data.en.md index 11a3051b..07a60b90 100644 --- a/content/hands-on-labs/explore-cli/cli-writing-data.en.md +++ b/content/hands-on-labs/explore-cli/cli-writing-data.en.md @@ -132,11 +132,11 @@ aws dynamodb update-item \ --key '{ "Id" : {"N": "201"} }' \ - --update-expression "SET #Color = list_append(#Color, :values)" \ - --expression-attribute-names '{"#Color": "Color"}' \ + --update-expression "SET #Color = list_append(Color, :values)" \ --expression-attribute-values '{ ":values" : {"L": [{"S" : "Blue"}, {"S" : "Yellow"}]} }' \ + --return-values ALL_NEW \ --return-consumed-capacity TOTAL ``` @@ -148,8 +148,8 @@ aws dynamodb update-item \ --key '{ "Id" : {"N": "201"} }' \ - --update-expression "REMOVE #Color[2], #Color[3]" \ - --expression-attribute-names '{"#Color": "Color"}' \ + --update-expression "REMOVE Color[2], Color[3]" \ + --return-values ALL_NEW \ --return-consumed-capacity TOTAL ```