skip to Main Content

Background:

A popular online learning platform is being built that will allow IT practitioners to submit solutions to various hands-on challenges to verify their skills 🙂
The team is now looking to design the database layer to accompany the Serverless application stack.

Amazon DynamoDB is a top candidate for the job. The Serverless advantages and many others are well understood, but there’s some concern over querying capabilities/flexibility.
If a prototype can be put together to demonstrate the ability of DynamoDB to support the most common likely queries, it would remove most doubts and allow the team to go all in.

The most used table in the high level design should be the one dealing with solution submissions.

The most common queries for this table in order of importance/frequency will be:

  • Queries to create, read and update challenge submission items
  • Queries to fetch all the submission items given a specific challenge ID (As well as the ability to further filter the result set based on the time the submission was created)

The team needs someone with experience in working with DynamoDB indexes to put together a table structure to support the above use case.

Bounty:

  • Points: 20
  • Path: Cloud Engineer

Difficulty:

  • Level: 2
  • Estimated time: 1-6 hours

Deliverables:

  • A DynamoDB table configured based on requirements

Prototype description:

A DynamoDB table set up with the relevant main structure and indexes, populated with the sample items provided.
The table design / indexes will support the following queries:

Main query pattern:

  • Writing, getting and updating a specific challenge submission item based on its submission ID.
    *Allows the app to record submissions and allows the support team to quickly look up
    submission details in case of issues.

Secondary query pattern:

  • Getting all challenge submissions items for a specific challenge.
  • Getting all challenge submissions items for a specific challenge from the last X minutes.
    *Allow the team to monitor submissions for specific challenges. This is useful for
    analytics and monitoring for issues.

Requirements:

General

  • The DynamoDB table name shall start with:

    ooggi-r-challenge-table-
  • The DynamoDB table shall be deployed in the Ireland (eu-west-1) region
  • The table shall be configured with the On-demand, pay per request option.

Sample Items

  • All sample items provided in the dataset.csv resource file should be written/loaded into the table.
  • The Data Types for all properties of the items in DynamoDB shall be set to the String Data Type.

Querying/Indexes

  • Given a specific submission_id in a DynamoDB query the relevant item will be returned with all properties.
  • Given only a specific challenge_id in a DynamoDB query, all submission items for that challenge shall be returned.
  • Given a specific challenge_id and a condition on the submission_time property, the relevant subset of submission items for the specific challenge shall be returned.
    For example: Get all the submission items where challenge_id is equal to X and where the value of submission_time is bigger than Y.

Other properties

  • The table shall not allow for duplicate items with the same submission_id to exist.
  • The table shall support the strong consistency option for queries to get/read specific submission items based on the submission_id.

Testing set-up

  • The Test Helper IAM Role stack should be deployed to allow the testing platform to interact with your DynamoDB table.

Artifacts/Resources:

  • A CSV file with the sample DynamoDB items to be loaded into the table:
    dataset.csv
  • To provide the test environment with permissions to interact with your DynamoDB table, the following stack needs to be deployed:
    CloudFormation Template Link
    *The IAM Role ARN (Amazon Resource Name) should later be provided on the solution submission page.
    *The IAM Role ARN can be found in the Outputs section of the deployed CloudFormation stack.

Your mission, if you choose to accept it,
is to deploy a DynamoDB table with the required indexes as a proof of concept.

Back To Top