Back
Close

Computing with Data

elgeish
533.4K views

Amazon DynamoDB - Part I

We created a table called reminder to store user-requested reminders for our previous example of a reminder bot. Now we can execute the following code to create reminders:

import boto3

dynamodb = boto3.resource('dynamodb')
dynamodb.Table('reminder').put_item(
  Item={
    'timestamp': 1511643670,
    'userID': '[email protected]',
    'ttl': 1511730070,
    'text': 'write a DynamoDB example',
  }
)
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io