Skip to content

ShortURL implemented on AWS using SAM, Lambda, DynamoDB, APIGateway, and Docker.

Notifications You must be signed in to change notification settings

heyimblake/SURL-AWS

Repository files navigation

SURL-AWS

ShortURL (a URL Shortener) application implemented on AWS.

Architecture

Architecture Diagram

Generated using the CloudFormation Designer.

Components

  • APIGateway
    • Handles routing and decides which Lambda should handle the request, if any.
  • Lambda
    • Three in total. One for each operation: create/delete/redirect
  • DynamoDB
    • Holds saved shortlinks along with their attributes (destination, expiration date, current date)

Other Tools Used

  • Apache Maven
    • Multi module, one for each lambda and one holding common utilities
  • Java 11 (Amazon Corretto)
  • Checkstyle
    • Uses Google's Checkstyle specifications for code formatting
  • Serverless Application Model (SAM)
  • Docker
    • For testing locally

Endpoints

Endpoint HTTP Method Headers Info
/{niceName} GET N/A Goes to the specified short link
/{niceName} DELETE N/A Deletes the short link
/create PUT niceName,destination,expireAt(optional) Creates a new short link. expireAt value is a long, time since epoch

To Do

  • Implement authentication/authorization with Amazon Cognito
  • Add a UI to easily view created links and delete them
  • Log analytics such as number of clicks, geolocation, etc
  • Document with the OpenAPI specification

Releases

No releases published

Packages

No packages published