Ongoing service disruptions
For the most recent update on ongoing service disruptions affecting the AWS Middle East (UAE) Region (ME-CENTRAL-1), refer to the AWS Health Dashboard. For information on AWS Service migration, see How do I migrate my services to another region?
我想解决我在将 AWS Lambda@Edge 函数与 Amazon CloudFront 分配相关联时收到的 502 和 503 错误。
当 Lambda@Edge 函数返回格式错误的响应,或者 Lambda@Edge 函数包含无效的内容时,就会出现“502”错误。响应的对象结构必须与 Lambda@Edge 事件结构相匹配。
要解决“502”错误,请执行以下操作:
有关详细信息,请参阅测试和调试 Lambda@Edge 函数和对 Lambda@Edge 的限制。
当函数代码中有未处理的异常或错误时,就会出现“503”错误。
要解决此问题,请在您的 Lambda@Edge 函数中添加日志记录语句(例如 console.log())),以写入 Amazon CloudWatch Logs。查看 CloudFront 运行该函数的 AWS 区域中的 CloudWatch 日志。
有关详细信息,请参阅 Four steps for debugging your content delivery on AWS(在 AWS 上调试内容传输的四个步骤)和对 Lambda 中的执行问题进行故障排除。
当您超出 Lambda@Edge 配额时,Lambda 会阻止函数执行。检查 Lambda@Edge CloudWatch 指标是否存在问题,例如每个 AWS 区域的并发执行量超出和函数超出限制。