Reputation: 2063
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:
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
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