Closed marcogrcr closed 1 year ago
Thank you for taking the time to submit this pull request. This topic will be reviewed for accuracy and updated accordingly.
Once I have more information I'll provide an update here.
Closing this issue or pull request in advance of archiving this repo. For more information about the decision to archive this repo (and others in the 'awsdocs' org), see the announcement on the AWS News Blog.
Issue #, if available:
N/A
Description of changes:
The DynamoDB multi-value context key examples omit the fact that
GetItem
,PutItem
,UpdateItem
(and likely other operations) always include the primary key attributes in thedynamodb:Attributes
context key. Therefore:ForAllValues
example provides a false sense of security since it does not protect for the case when the user implicitly requests all attributes by not specifying aProjectionExpression
.ForAnyValue
example provides a condition that will never evalute to false since it includes the partition key in the value list.This commit fixes the previously mentioned problems in the examples. Additionally, the
ForAnyValue
example is updated to use theUpdateItem
operation instead ofPutItem
since it has more semantic meaning.Other minor changes like the order of appearance of
Warning
andImportant
messages and the reference to the DynamoDB documentation are updated to more logical places.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.