mark
mark

Reputation: 2063

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

I am perplexed as to how I can associate an AWS Lambda@Edge function with a CFT and not have it show up in the AWS console under 'CloudFront > Functions'.

Is this a different type of association? Do I need to make changes to my CFT? Is it a bug in the AWS console?

CFT snippet:

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

View of the console:

aws console with no functions shown

Any thoughts appreciated.

Edit: If I create a function via the screen above, the generated ARN is:

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

so that tells me that there are different types of functions.

Upvotes: 0

Views: 414

Answers (1)

Marcin
Marcin

Reputation: 238657

Is this a different type of association?

Yes. Lambda@Edge and CloudFront functions are different. If you want to use CloudFront functions you have to create them using AWS::CloudFront::Function.

But your code shows that you are using Lambda@Edge which has no relation with CloudFront functions, thus it does not show in that menu.

Upvotes: 1

Related Questions