Skip to content

Instantly share code, notes, and snippets.

@kenvontucky
Last active March 2, 2020 22:29
Show Gist options
  • Save kenvontucky/a5c58f97bba1ddd99ce39110a15f9b47 to your computer and use it in GitHub Desktop.
Save kenvontucky/a5c58f97bba1ddd99ce39110a15f9b47 to your computer and use it in GitHub Desktop.
TABLE_NAME = 'Log'
TIMESTAMP = 'updated_at'
STATUS = 'status'
INDEX_STATUS_KEY = 'Status'
SCHEMA = {
'TableName': TABLE_NAME,
'AttributeDefinitions': [
{
'AttributeName': TIMESTAMP,
'AttributeType': 'S'
},
{
'AttributeName': STATUS,
'AttributeType': 'S'
}
],
'KeySchema': [
{
'AttributeName': TIMESTAMP,
'KeyType': 'HASH'
}
],
'ProvisionedThroughput': {
'ReadCapacityUnits': 10,
'WriteCapacityUnits': 10
},
'GlobalSecondaryIndexes': [{
'IndexName': INDEX_STATUS_KEY,
'KeySchema': [{
'AttributeName': STATUS,
'KeyType': 'HASH'
}
],
'Projection': {
'ProjectionType': 'ALL'
},
'ProvisionedThroughput': {
'ReadCapacityUnits': 10,
'WriteCapacityUnits': 10
}
}],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment