Last active
March 2, 2020 22:29
-
-
Save kenvontucky/a5c58f97bba1ddd99ce39110a15f9b47 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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