Request Processor and Concrete Adapters

In this lesson, you'll see how to go about implementing the request processor along with concrete adapters using the Ports and Adapters design pattern.

For the ShowFormFunction handler, the core business logic is to validate that a requested upload has an extension and that the extension belongs to a list of approved file types. For valid extensions, the function needs to create a unique upload file name based on the request ID and the extension, and produce a signed upload policy and a signed download policy. This business core will have three ports (shown in the figure provided below):

  1. The first port should provide the request ID and the extension, starting the process, and format the resulting signatures accordingly.
  2. The second port should sign upload policies based on a key.
  3. The third port should sign download policies based on a key.

Get hands-on with 1000+ tech skills courses.