For more theory and explanation, please refer to the previous recipe, Setting up CloudWatch alarms (AWS CLI).