Unleashing the Power of the Cloud (AWS): The Epic Journey of the Cloud Resume Challenge-
Part 4: Slaying DynamoDB and API Gateway. The Cloud Resume Challenge continues.

Steve Murimi
4 min readJul 26, 2023

AWS Cloud resume challenge.

As part of the requirements of the cloud resume challenge, we were tasked with creating a live counter that displays the number of visitors that have accessed the website.

To do this we would need to choose a dynamic database to store our records. The two options I could think of were to use DynamoDB or MongoDB atlas. This time I chose to use DynamoDB.

DynamoDB is a Fast, flexible NoSQL database service for single-digit millisecond performance at any scale and includes Free 25 GB of storage and up to 200 million read/write requests per month with the AWS Free Tier

Create the DynamoDB Table.

The first step is to create a table to store our data as shown below:

The partition key is the unique identifier we will be using to identify records. Normally you would use an id and perhaps a name as the sort key but we dont need that here. we are only collecting the count hence only one datapoint is necessary.

Customize table settings.

Upon creation of the table, choose edit so as to manually configure your table:

Table settings.

The DynamoDB infrquent access class is slightly cheaper and quite adequate for testing purposes, kindly review your project requirements for a production environment:

Generally on AWS, ‘on demand’ tends to be more pricey hence for this project, I allocated a reasonable amount of provisioned capacity units. These determine how many read and write units are allocated to the table.

We do not need autoscaling for this project.

After inputing the info, AWS provides a cost estimate as shown below, this can be used to tailor your table according to your needs and budget:

The configuration I chose to go with is:

Encryption? Tags!

It is always good practice to set ‘Tags’ on any resources you create:

Input data into the table.

This is done by creating an item as shown below:

Once you have created an entry into your table, in order to view it simply initiate a scan. Note: each scan has an associated cost and counts towards your free tier limit.

API Gateway.

Celebrate!

Congratulations you have succesfully created a DynamoDB table!

Photo by DESIGNECOLOGIST on Unsplash

Resources:

  1. DynamoDB Cheatsheet — Everything you need to know about Amazon Dynamo DB for the 2020 AWS Certified Developer Associate Certification
  2. Cloud Resume Challenge — Part 3: Lambda, DynamoDB, & API Gateway
  3. Guide to the Cloud Resume Challenge — Part 3: DynamoDB, API gateway, and Lambda functions

Join me next time on Unleashing the Power of the Cloud (AWS): The Epic Journey of the Cloud Resume Challenge-
Part 5: Lambda almost drove me mad, but I conquered it! — The Cloud Resume Challenge continues.

Adios for now!

Project breakdown:

Unleashing the Power of the Cloud (AWS): The Epic Journey of the Cloud Resume Challenge — Part 1: S3 static website hosting.

Unleashing the Power of the Cloud (AWS): The Epic Journey of the Cloud Resume Challenge-
Part 2: Conquering Cloudfront — Harnessing the Forces of Global Content Delivery.

Unleashing the Power of the Cloud (AWS): The Epic Journey of the Cloud Resume Challenge-
Part 3: GitHub Actions — CI-CD through Github for the win!

--

--