Serverless Express Component and SQS

I have a serverless express component where all of my business logic lies for my api. I want to add a a task queue via SQS to process some tasks async. The tasks that I want to execute need a lot of code that exist in the serverless express component.

What is the best way to accomplish executing a task via SQS where most of the code lies in the serverless express component?

I tried creating a new lambda component that has SQS as its trigger, but wasn’t able to figure out how to share code between the express component and the lambda component.

I tried just setting the SQS trigger as the lambda function from express component, but wasn’t able to figure out how to support both the express component api and the SQS trigger at the same time.