我想为一些著名的路径从Cloudfront函数生成404页。到目前为止,我能够用封闭的伪代码生成404响应,但没有任何主体。文档表明这是可能的,但没有任何例子。
function handler(event) {
// NOTE: This example function is for a viewer request event trigger.
// Choose viewer request for event trigger when you associate this function with a distribution.
var req
我收到以下关于lambda函数内存大小的错误消息
Error: error updating CloudFront Distribution (ENLY37UZ3CJCF):
InvalidLambdaFunctionAssociation: The function memory size is larger than the maximum
allowed size for functions that are triggered by a CloudFront event: 1024
Max allowed: 128 Function: arn:
我使用lambda@edge来用cloudfront重定向我的站点。
我已经将我的版本lambda附加到我的云前端缓存行为到它所拥有的所有4个事件上。
当我碰到cloudfront端点时,上面写着
502 ERROR
The request could not be satisfied.
The Lambda function returned invalid json: The json output must be an object type.
当我检查我的lambda日志/调用度量时,我根本没有看到任何点击。
这背后的原因是什么?
我尽力找出了为什么我的羔羊没被触发的原因??