[{"data":1,"prerenderedAt":34},["ShallowReactive",2],{"snippet-cloudwatch-insight-apigw-paths-with-most-401-403":3},{"id":4,"title":5,"contributors":6,"description":8,"extension":9,"gitHub":10,"introBox":13,"languages":18,"meta":19,"resources":20,"services":21,"snippets":23,"stem":28,"tags":29,"type":32,"__hash__":33},"snippets\u002Fsnippets\u002Fcloudwatch-insight-apigw-paths-with-most-401-403.json","Paths with most access denied responses",[7],"content\u002Fcontributors\u002Fgiedrius-praspaliauskas.json","Get list of paths that returned most of 401 and 403 response status codes in your API Gateway access log group.","json",{"template":11},{"repoURL":12},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-snippets\u002Ftree\u002Fmain\u002Fcloudwatch-insight-apigw-paths-with-most-401-403",{"headline":14,"text":15},"How it works",[16,17],"Cloudwatch Log Insights snippet that returns top 10 of the API paths with the most 401 and 403 response status codes.","See snippet GitHub repository for the logging setup instructions.",[],{},null,[22],"apigw",[24],{"title":25,"language":26,"code":27},"Copy the code into CloudWatch Logs Insights","css","stats count(*) as accessDeniedCount by status, path, httpMethod\n| filter status=403 or status=401\n| limit 10","snippets\u002Fcloudwatch-insight-apigw-paths-with-most-401-403",[30,31],"Logs","API Gateway","CloudWatch Logs Insights","jhaekTFn_y0fUOch36Kh3M7o0GqE4fLD-FnA4l1614s",1792578863994]