We now inject HTTP requests towards the
ListRestApiEndpointMonitorOper API. Follow the steps below to start sending traffic to the API endpoint.
ListRestApiEndpointMonitorOperAPI endpoint either on the Outputs tab of the
myServerless-StackCloudFormation stack, or by running this command:
aws cloudformation describe-stacks --stack-name myServerless-Stack --query Stacks.Outputs
Open the file
sendAPIRequest.py and update the
url variable with the
ListRestApiEndpointMonitorOper API url value from the previous step.
After the script is saved, trigger the script using the following command:
Make sure you’re getting an output of status 200 with the records that we fed into the DynamoDB table (see the following screenshot). You may have to launch multiple tabs (preferably 4 separate tabs) of the terminal to run the script to increase the rate of traffic. In every new terminal, change directory using command: cd amazon-devopsguru-samples/generate-devopsguru-insights/ and then run command: python sendAPIRequest.py.
After approximately 10 minutes of the script running in a loop, an operational insight is generated in DevOps Guru.