Lambda Function Testing

Learn to test the Lambda function.

We'll cover the following

In the previous lessons, we created a DynamoDB database, created the code for the Lambda functions, and successfully deployed them. Now, it's time to test our functions before we add them to the Step Functions workflow.

However, before we test the functions, we need to add records to the database because it's empty at the moment. Instead of adding them manually, which would be a very time-consuming process, we'll use the AWS CLI to do this, which will make the process easier.

Note: Make sure that name of the database is correct. If all instructions have been followed, the DynamoDB table should be named sweet-factory-inventory-dev.

Working with DynamoDB using CLI

Let's use AWS CLI to seed the DynamoDB table. First, we created a JSON file (ingredients.json) containing the initial data (database name and items):

Get hands-on with 1400+ tech skills courses.