As you have seen already in this Workshop, New Relic agents send event data to New Relic as part of the normal harvest cycle whenever your Lambda function is executed. You can also add your own custom APM events and attributes, which you can then use for querying and charting.
Before we proceed in adding a custom event to our Lambda function, let’s first clean up the errors we intentionally introduced earlier in the Workshop.
Scroll down to the Backup table details section and copy the table’s original name:
Scroll back up to the top of the page and paste it into the field labeled New table name:
Finally, scroll down to the bottom of the page and click the Restore table button.
Navigate to Lambda within the AWS Console by searching for it in the search bar at the top of your AWS Console screen. Then, search for and click on the link to the example producer function link:
Scroll down to the section labeled Code source and double-click file named lambda_function.py to open it:
Rename the variable DB_TABLE_NAME back to TABLE_NAME:
Click the Deploy button located at the top right hand side of the Code source section of the page: