AWS SAM call lambdas from dockerized python app

I’d like to write a python algo trading app. The app would consist of dockerized websocket listener for prices/orders streams and a set of strategies (functions or classes).

The strategies are defined in lambdas and active instances are saved in a db (e. g. when prices drop below X buy this instrument and immediately place a sell order for this instrument).

On every message in the stream (e. g. price change) the db must be queried for active strategies.
How I could easily connect them to my dockerized websocket listener (probably running on EC2). Is it possible to have dockerized EC2 app + lambdas definitions in on AWS SAM stack so I can easily call them and db (let’s say DynamoDB) from the websocket listener ?

Source: Docker Questions