CloudFront Lambda@Edge 缓存行为未显示在 AWS 控制台中

CloudFront Lambda@Edge Cache Behavior Not Showing up in AWS Console

我对如何将 AWS Lambda@Edge 函数与 CFT 相关联而不让它显示在 'CloudFront > Functions' 下的 AWS 控制台中感到困惑。

这是一种不同类型的协会吗?我需要更改我的 CFT 吗?是 AWS 控制台中的错误吗?

CFT 片段:

CloudFrontDistribution:
    Type: AWS::CloudFront::Distribution
    Properties:
      DistributionConfig:
        Aliases:
          - my.site.dev
        DefaultCacheBehavior:
          TargetOriginId: !Sub 'S3-${AWS::StackName}-root'
          LambdaFunctionAssociations:
            -
              EventType: origin-response
              LambdaFunctionARN: !Ref Lambdaversion

控制台视图:

任何想法表示赞赏。

编辑: 如果我通过上面的屏幕创建一个函数,生成的 ARN 是:

arn:aws:cloudfront::123456789012:function/test

所以这告诉我有不同类型的函数。

Is this a different type of association?

是的。 Lambda@Edge 和 CloudFront functions are different. If you want to use CloudFront functions you have to create them using AWS::CloudFront::Function.

但是您的代码显示您正在使用与 CloudFront 功能无关的 Lambda@Edge,因此它不会显示在该菜单中。