text: Next, API Gateway integrates with Lambda, a compute service, to handle the new event. Lambda 
  
  function code parses the parameters in the inbound event, connects to the data store, and retrieves 
  
  the cart. The function queries the database API through an SDK library. Because the DynamoDB 
  
  database is also serverless and built to respond with low latency, there is no need for a connection 
  
  pool. 
  
  After converting currency to USD and removing unavailable items, the function sends the result as 
  
  a new event to API Gateway. 
  
  Finally, API Gateway converts the event into a response to send to the waiting client. 
  
  The method with which a function is invoked should be informed by your application archecture 
  
  and needs. For example, batch-processing patterns have diﬀerent applications to on-demand data 
  
  processing. Understanding these paradigm diﬀerences can also help customers decide between 
  
  AWS services. 
  
  Deploying a microservice as a containerized application on Fargate could be more appropriate if 
  
  the microservice is primarily used for batch data processing. Whereas a Lambda function would be 
  
  much more straight-forward to deploy and maintain in applications that require on-demand data 
  
  processing. 