> ## Documentation Index
> Fetch the complete documentation index at: https://docs.briankimemia.is-a.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Load Data into DynamoDB

> 🌟 Create a table with Amazon DynamoDB,⬆️ Upload data into DynamoDB using AWS CloudShell,🔧 Edit data in your DynamoDB tables
.

# Your Step-By-Step Project: Load Data into DynamoDB

***

## 🌟 Step 1: Login with Your IAM User

<Section title="Overview">
  For this project, you'll need your **IAM user**, not your root user.
</Section>

### Steps:

1. **Log in with your IAM Admin User**.

   * If you already have an IAM user, skip to the next step.

2. **Don't have an IAM user yet? Follow these quick steps:**

<Tip>
  💡 **What is an IAM user?**
  An IAM user in AWS allows you to securely access and manage your AWS resources without using the root user account. This protects your root account from potential security breaches.
</Tip>

#### Steps to Create an IAM User:

1. Log in as the **root user**.

2. Open the [AWS IAM Console](https://console.aws.amazon.com/iam).

3. On the left-hand navigation panel, select **Users**.

4. Click **Create user**.

5. Enter a username (e.g., `YourName-IAM-Admin`).

6. Enable **Access to the AWS Management Console**.

7. Set a **custom password** you can remember.

8. Deselect the option for "Users must create a new password at next sign-in."

9. Attach the policy **AdministratorAccess**.

10. Click **Create user**.

<Disclaimer>
  ⚠️ **Important:** Always log in using your IAM user instead of the root user for better security.
</Disclaimer>

***

## 🌟 Step 2: Create Your First DynamoDB Table

<Section title="Overview">
  DynamoDB is a non-relational database service. It’s flexible, scalable, and ideal for modern applications. Let’s create a simple table.
</Section>

<Tip>
  💡 **What is DynamoDB?**
  DynamoDB is a NoSQL database that organizes data into **tables**, where each table is a collection of items (like rows in relational databases). Each item contains attributes (like columns).
</Tip>

### Steps:

1. Open the [DynamoDB Console](https://console.aws.amazon.com/dynamodb).

2. Click **Create table**.

3. Fill in the following details:

   * **Table Name**: `CloudStudents`

   * **Partition Key**: `StudentName` (String)

<Tip>
  💡 **What is a Partition Key?**
  A partition key is the primary identifier for items in your table. It’s used to efficiently retrieve data.
</Tip>

1. **Capacity Settings**:

   * Turn off **Auto Scaling**.

   * Set **Read/Write Capacity Units** to 1.

<Tip>
  💡 **Why Disable Auto Scaling?**
  Auto scaling adjusts database performance automatically but may increase costs. Disabling it ensures the project stays within AWS Free Tier limits.
</Tip>

1. Click **Create table**. 🎉

<Disclaimer>
  ⚠️ **Note:** Although AWS shows a cost estimate, this project is Free Tier eligible. Just remember to delete resources when done.
</Disclaimer>

***

## 🌟 Step 3: Add an Item to Your Table

<Section title="Overview">
  Now that your table is ready, let’s add some data.
</Section>

1. Select your table, `CloudStudents\`.

2. Click **Create Item**.

3. Enter the following details:

   * **Partition Key (StudentName)**: `Nikko`

   * Add an attribute:

     * **Attribute Name**: `ProjectsComplete`

     * **Type**: Number

     * **Value**: 4

<Tip>
  💡 **What are Attributes?**
  Attributes are pieces of data about an item. In this case, `ProjectsComplete` is an attribute describing the student `Nikko`.
</Tip>

1. Click **Save**. You’ve successfully added an item to your DynamoDB table! 🎉

***

## 🌟 Step 4: Understand DynamoDB Capacity Units

<Section title="Overview">
  Capacity units measure how much data your table can handle per second.
</Section>

<Tip>
  💡 **Read Capacity Units (RCUs)**
  1 RCU allows your table to read **up to 2 items per second**.
</Tip>

<Tip>
  💡 **Write Capacity Units (WCUs)**
  1 WCU allows your table to write **1 item per second**.
</Tip>

<Disclaimer>
  ⚠️ **Reminder:** Always delete your DynamoDB table when you’re done to avoid unwanted charges.
</Disclaimer>

***

## 🌟 Final Check

1. Ensure your table `CloudStudents` is created.

2. Confirm the item `Nikko` is visible in the table.

<Tip>
  💡 **DynamoDB Flexibility**
  Unlike traditional relational databases, DynamoDB tables can store items with varying attributes. This makes it ideal for unstructured or semi-structured data.
</Tip>

***

## 🎉 Congratulations!

You’ve set up an IAM user, created a DynamoDB table, and added data successfully. 🚀

<Disclaimer>
  ⚠️ **Final Tip:** Delete your resources to avoid incurring charges. Visit the respective AWS Consoles for IAM and DynamoDB to clean up.
</Disclaimer>

## 📧 Contact

For questions or feedback, reach out:

📨 Email: [projects@briankimemia.is-a.dev](mailto:projects@briankimemia.is-a.dev)
🌐 Portfolio: [Brian Kimemia](https://briankimemia.is-a.dev/)
**GitHub:** [BrianKN019](https://github.com/BrianKN019)

***

**Thank you for exploring this project! Let’s innovate and build secure AWS solutions together. 🚀**
