Skip to content

Instantly share code, notes, and snippets.

@billydh
Last active January 13, 2020 22:07
Show Gist options
  • Select an option

  • Save billydh/7c2cfef601ae077b34ed0c473e4c1426 to your computer and use it in GitHub Desktop.

Select an option

Save billydh/7c2cfef601ae077b34ed0c473e4c1426 to your computer and use it in GitHub Desktop.
aws dynamodb update-item --endpoint-url http://localhost:8042 --table-name demo-customer-info \
--key '{"customerId": {"S": "1111"}}' \
--update-expression 'SET #isEligibleForPromotion = :eligibility' \
--expression-attribute-names '{"#isEligibleForPromotion": "isEligibleForPromotion", "#dateOfBirth": "dateOfBirth"}' \
--expression-attribute-values '{":eligibility": {"BOOL": true}, ":dateFrom": {"S": "1980-01-01"}}' \
--condition-expression "#dateOfBirth > :dateFrom" \
--return-values ALL_NEW
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment