My situation is:
I have a CloudFront distribution managed by CloudFormation that, amongst other things, needs to pass certain requests to an Edge Lambda.
I have a CodePipeline that builds new versions of my Lambda function based on repository commits.
I need to update the Lambda ARN in my CloudFront distribution whenever this lambda gets re-built to point to the new version.
So, I somehow need to reference the latest Lambda version in my CloudFormation template, and trigger CloudFormation to update my distribution whenever the CodePipeline builds a new version. Is it possible to do that passively? Do I have to write some new function to actively force a re-build? Is there another pattern for this I'm not aware of?