Task 2: Domain Blocking


Task Description

In this task, your goal is to implement the ability to block redirections to specific domains and links containing certain keywords. For example, the police may request that no shortened links redirect to the domain “danger.com” or to links containing the word “porn.”

The blocks may differ based on data type, so consider two use cases:

  1. Blocking a specific domain (e.g., danger.com).
  2. Blocking links containing certain keywords (e.g., “porn”).

Requirements Summary

  1. The system should allow blocking entire domains (e.g., danger.com), preventing redirection to any page within that domain.
  2. The system should block links containing specific keywords (e.g., “porn”) in any part of the URL.
  3. Blocked links should not be shortened or redirected.

Technical Requirements

  1. Domain Blocking – The system must check the full URL and prevent shortening or redirecting if the URL belongs to a blocked domain (e.g., danger.com). The block should apply to the main domain and all its subpages.
  2. Keyword Blocking – The system must check for specific keywords (e.g., “porn”) in the URL and prevent redirecting or shortening such links.
  3. Serverless – Prefer serverless-based solutions.

Task

Draw your solution on paper using AWS service icons provided. Your solution should include:

  • The architecture of the extended system
  • Use case diagrams for the two scenarios:
    • Blocking a specific domain (e.g., danger.com).
    • Blocking keywords in the URL (e.g., “porn”).
  • Data access diagrams