Skip to content

Instantly share code, notes, and snippets.

@jeremeamia
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremeamia/510b28247b37a37d5bc6 to your computer and use it in GitHub Desktop.
Save jeremeamia/510b28247b37a37d5bc6 to your computer and use it in GitHub Desktop.
Short example of putting a DynamoDB item with new types.
<?php
$dynamoDbClient->putItem([
'TableName' => 'test-table',
'Item' => [
'id' => ['S' => '5432c69300594'],
'name' => ['S' => 'Jeremy'],
'age' => ['N' => '30'],
'phone' => ['L' => [
['M' => ['type' => ['S' => 'mobile'], 'number' => ['S' => '5555555555']]],
['M' => ['type' => ['S' => 'home'], 'number' => ['S' => '5555555556']]],
]],
'real' => ['BOOL' => true],
'stuff' => ['NULL' => true],
]
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment