简体   繁体   English

AWS API 网关偶尔会出现 4xx 错误

[英]AWS API Gateway occasionally gives 4xx Error

I'm currently using API Gateway's REST API and getting about 200-300 hits every 5 minutes.我目前正在使用 API 网关的 REST API 并且每 5 分钟获得大约 200-300 次点击。 I've enabled CloudWatch logs on the API level for errors and turned on Detailed CloudWatch Metrics.我已针对错误在 API 级别启用了 CloudWatch 日志,并打开了详细的 CloudWatch 指标。

I've also set CloudWatch Alerts for any time the API returns a 4xx error.我还为 API 返回 4xx 错误的任何时间设置了 CloudWatch 警报。

I get 4xx errors randomly, but never in chunks.我随机收到 4xx 错误,但从来没有出现过。 I'll probably get 1 every 3-4 hours.我可能每 3-4 小时就会得到 1 个。 However, these errors aren't being logged in CloudWatch for me to troubleshoot.但是,这些错误没有记录在 CloudWatch 中供我进行故障排除。

Is it normal to get random 4xx errors every now and then?偶尔出现随机 4xx 错误是否正常?

Please enable access logging with appropriate context variables请使用适当的上下文变量启用访问日志记录
https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS API 网关:如何在 cloudwatch 中记录 4XX 和 5XX 错误? 示例查找状态代码 413,请求实体太大错误是否记录在 Cloudwatch 中? - AWS API Gateway: How is 4XX and 5XX errors logged in cloudwatch? Example find Status Code 413, Request Entity too large error is logged in Cloudwatch? AWS ELB 不健康 4xx - AWS ELB unhealthy 4xx AWS elastic beanstalk 100.0% 的请求出错 HTTP 4xx - AWS elastic beanstalk 100.0 % of the requests are erroring with HTTP 4xx AWS Cloudformation - 将 VPC_Link / NLB 附加到 api 网关中的方法给出“无效方法设置路径”错误 - AWS Cloudformation - Attach VPC_Link / NLB to method in api gateway gives "Invalid method setting path" error AWS CloudFormation/API 网关给出“指定的资源标识符无效” - AWS CloudFormation/API Gateway gives 'Invalid Resource identifier specified' AWS API 网关和授权方 CORS 错误 - AWS API gateway and authorizer CORS error 自定义授权方的 AWS API 网关 403 错误 - AWS API gateway 403 error for Custom Authorizer AWS API 网关签名 - AWS API Gateway Signature 错误:找不到模块“aws-api-gateway-client” - Error: Cannot find module 'aws-api-gateway-client' 消息:尝试访问 AWS 网关 api 时出现“内部服务器错误” - message: "Internal server error" when try to access aws gateway api
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM