Step 2: Create a Lambda Function and Test It Manually
In this section, you do the following:
Create a Lambda function deployment package using the sample code provided.
Create an IAM role (execution role). At the time you upload the deployment package, you need to specify an IAM role (execution role) that Lambda can assume to execute the function on your behalf.
Create the Lambda function and then test it manually.