How to add multiple lambda edge functions to cloudfront distribution

I have a requirement to have different lambda edge functions for several different subdomains.

I have asked this question from aws and have been told I could achieve this by using path_patterns, but I cant see this option on the aws_cloudfront_distribution.

If you are looking to attach Lambda@edge functions based on the URL’s, you can create path patterns for those URL’s in the CloudFront behaviour and attach the corresponding Lambda@Edge functions to them.

For example, if you have two URLs, “www.example.com/new/something1” and “www.example.com/new/something2”, and two Lambda@Edge functions, “Lambda@Edge1” and “Lambda@Edge2”, you can create path patterns “/something1” and “/something2” in the CloudFront behavior. Then, you can attach the “Lambda@Edge1” function to “/something1” and the “Lambda@Edge2” function to “/something2” path patterns.