in workflow1_endpointbuilder/sam-app/functions/function1_createtableandfunction3trigger/index.py [0:0]
def create_dataset_table(datetime_id, bucket_name):
dynamodb_resource = boto3.resource('dynamodb')
dynamodb_resource.create_table(
TableName=f'DatasetCSVTable_{datetime_id}_{bucket_name}_',
KeySchema=[
{
'AttributeName': 'objectKey',
'KeyType': 'HASH'
}
],
AttributeDefinitions=[
{
'AttributeName': 'objectKey',
'AttributeType': 'S'
}
],
ProvisionedThroughput={
'ReadCapacityUnits': 1000,
'WriteCapacityUnits': 1000
},
StreamSpecification={
'StreamEnabled': True,
'StreamViewType': 'NEW_AND_OLD_IMAGES'
}
)