Create DynamoDB

Create DynamoDB Table

In the API monitoring system, we will use Amazon DynamoDB as a NoSQL database to store information such as user logs, API queries, or other data that needs to be tracked in real time.

Objective of this step:

  • Create a DynamoDB table to be used during the Lambda deployment process.
  • Configure the primary key and basic settings.

Steps to follow:

  1. Log in to AWS Console:
  • Visit: AWS console
  • Ensure you have selected the correct region (e.g., us-east-1 or ap-southeast-1).
  1. Navigate to the DynamoDB service:
  • Search for DynamoDB in the search bar and select the service.
  1. Create a new table:
  • Click the “Create table” button. dynamoDB
  1. Enter table details:
  • Table name: WebsiteVisitors (or any custom name)

    • Partition key: userKey

    • Data type: String

    • (Optional) You can add a Sort key to organize data by time or endpoint.

      • Example: timestamp - Number

    dynamoDB

  1. Create the table:
  • Finally, click “Create table” to complete the setup. dynamoDB
  1. Confirm table creation success: dynamoDB

Next, we will create the Lambda Functions.