HTTP API (API Gateway v2) Is Not Setting Trigger/Endpoint Path In Lambda Correctly


I am trying to deploy a HTTP API (API Gateway v2) with a lambda integration. But for some reason after deploying it doesn’t setup the trigger correctly on the lambda as it just sets the default endpoint without the path set. I check the gateway itself and the route/path is created correctly and says it linked to the lambda. The only way to fix it is to detach the intergration and reattach it within AWS console and then magically it creates a new trigger on the lambda with the endpoint and path set correctly.

Please can someone help me understand why its not deploying correctly in the first place? As i’m following the documentation correctly. If I use Rest api gateway it deploys the path correctly.

Function.yml sample:

handler: src/foo/bar.lambda_handler
runtime: python3.8

  #- httpApi: 'POST /*****/****'
   - httpApi:
       method: POST
       path: /foo/bar
  #- http:
       #method: post
       #path: /*****/*****