I am trying to create a AWS codepipeline which will be trigger when certain files are uploaded on specific folders on the MonoRepo. for eg: I have a monorepo with my frontend in Folder_A (reponame/apps/folder_A)and Backend on Folder_B(reponame/apps/folder_B). If I make changes to a file inside Folder_A and push, AWS codepipeline (Codepipeline for Folder_A) should be triggered.
This is how I planned to implement the solution. Whenever there is a PR, the webhook payload is sent to AWS API Gateway which then triggers lambda and pushes payload to lambda. The code in lambda will identify the path of the file changed and triggers respective AWS code pipeline. But I am unable to get the information on which folder was updates on the webhook payload i.e path of the file changed on bitbucket. I am looking for a way to get the filepath on webhook payload.