Created
January 18, 2020 16:59
-
-
Save mamiwinsfall93/635b1213b6b2b2cd1aacbb4f8f112aea to your computer and use it in GitHub Desktop.
LAMBDA
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
mport boto3 | |
dynamodb = boto3.resource('dynamodb') | |
table = dynamodb.Table('courses') | |
print(table.creation_date_time) | |
with table.batch_writer() as batch: | |
batch.put_item( | |
Item={ | |
'courseID':2, | |
'Title': 'Building Secure Web Applications', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 300 | |
}) | |
batch.put_item( | |
Item={ | |
'courseID':3, | |
'Title': 'Software Security Testing ', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 500 | |
} ) | |
batch.put_item( | |
Item={ | |
'courseID':4, | |
'Title': 'Risk Analysis and Threat Modeling', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 100 | |
}) | |
batch.put_item( | |
Item={ | |
'courseID':5, | |
'Title': 'Secure Software Engineering', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 600 | |
}) | |
batch.put_item( | |
Item={ | |
'courseID':6, | |
'Title': 'Mitigating Software Vulnerabilities', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 700 | |
} | |
) | |
batch.put_item( | |
Item={ | |
'courseID':7, | |
'Title': 'Securing Mobile Apps', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 800 | |
} | |
) | |
batch.put_item( | |
Item={ | |
'courseID':8, | |
'Title': 'Workplace Learning in Software Development', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 400 | |
} | |
) | |
batch.put_item( | |
Item={ | |
'courseID':9, | |
'Title': 'Database Security', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 900 | |
} | |
) | |
batch.put_item( | |
Item={ | |
'courseID':10, | |
'Title': 'Detecting Software Vulnerabilities', | |
'Subject ': 'SDEV', | |
'NumCredits': 3, | |
'CatalogNbr': 200 | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment