Example aws cli command to write an item to DynamoDB table that exists – put-item

https://docs.aws.amazon.com/cli/latest/userguide/cli-dynamodb.html

shorthand cli commands – shortens json

https://docs.aws.amazon.com/cli/latest/userguide/shorthand-syntax.html

My sample put-item to Contacts table

aws dynamodb put-item \
--table-name Contacts \
--item '{
"ContactName": {"S": "JBird"},
"ContactSeq": {"N": 63} ,
"AlbumTitle": {"S": "Somewhat Famous"} }' \
--return-consumed-capacity TOTAL
{
"ConsumedCapacity": {
"CapacityUnits": 1.0,
"TableName": "Contacts"
}
}


Leave a Reply

Your email address will not be published. Required fields are marked *