Serverless Developer Guide
Now, let us compare a similar work ﬂow implemented with event-driven architecture.
This diagram represents a microservice that retrieves data from a database, for example, retrieving 
shopping cart items for a customer order.
First, a web or mobile client makes an HTTP request to GET /cart/A1234B56 for a list items in a 
cart.
A component needs to accept the request and extract metadata, such as HTTP method, path, 
extra path info, query string parameters, headers, and cookies. That component will also verify the 
request is from an authenticated and authorized entity. In AWS, API Gateway accepts the inbound 
URL, extracts the parameters, query string, and headers and creates an event to send to other 
services for processing.
Example based on event.json API Gateway proxy event for a REST API:
{ 
  "resource": "/cart", 
  "path": "/cart/A1234B56", 
  "httpMethod": "GET", 
  "headers": { 
      "accept": "text/html,application/xhtml+xml,application/xml;q=0.9", 
      "accept-encoding": "gzip, deflate, br", 
      "User-Agent": "Chrome/80.0.3987.132 Safari/537.36", 
      "X-Amzn-Trace-Id": "Root=1-5e66d96f-7491f09x5pl79d18acf3d050", ... 
  }, 
  "multiValueHeaders": { 
      "accept": [ 
          "text/html,application/xhtml+xml,application/xml;q=0.9," 
      ], 
24