Reputation: 79
The below table insert command takes a json as an input. I am trying to do variable substitution but it didnt work. What is the right way to do it.
note: echo on numberoflines works.
aws dynamodb put-item --table-name staging-metrics --item '{ "count": {"S": $numberoflines} }'
tried alternatives like "$(numberoflines)" but that stores $(numberoflines) literally in table.
Upvotes: 0
Views: 713
Reputation: 2620
I'm not sure about this... but isn't --item "{ \"count\": {\"S\": $numberoflines} }"
Upvotes: 1