If user enters an attribute that does not exist in Dynamodb, accept the attribute and store into Dynamodb.
Currently, I have 'id' and 'firstName' as the attributes and user can create by inserting their firstName however, if they want to add a 'lastName' attribute, dynamodb should accept the 'lastName' and store into the database.
def create(event):
body = dict(event['body'])
id = body['id']
firstName = body['firstName']
response = table.put_item(
Item={
'id': str(id),
'firstName': firstName,
},
)