Featured resource
Forrester Wave Report 2025
Pluralsight named a Leader in the Forrester Wave™

Our tech skill development platform earned the highest scores possible across 11 criteria.

Learn more
  • Labs icon Lab
  • Cloud
  • Data
Google Cloud Platform icon
Labs

Populating Your RDS Table with Mock Data

In this lab, you will learn how to write a script that populates an existing RDS table with mock data. You’ll take a look at `pandas` and `Faker`, two Python libraries that will allow you to easily generate data and add it to your MySQL database.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 0m
Published
Clock icon Dec 16, 2022

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Record the Public DNS of Your RDS Instance

    • Navigate to the RDS service.
    • Navigate to your instances and view the RDS instance generated for this lab.
    • Find the instance details and record the public DNS for use later in the lab.
  2. Challenge

    Create a Cloud9 Development Environment

    • Navigate to the Cloud9 service.
    • Create a development environment with an SSH connection.
    • Connect to your new Cloud9 development environment.
  3. Challenge

    Write a Script to Populate Custom MySQL Data to Your RDS Table

    From the Cloud9 file directory, create a .py script file to contain your solution code that does the following:

    • Initializes Faker.
    • Models your mock data.
    • Initializes a DataFrame with your mock data..
    • Sends your mock data to a new table in your database.
  4. Challenge

    Test Your Solution and View the Items Added to Your MySQL Database

    • Run your solution script.
    • Connect to your database and view the items in the table you created. You should see the generated mock data in your database.
  5. Challenge

    Install Dependencies for Your Solution

    If following the provided solution and using Python, use pip install to install the pandas, Faker, collections, SQLAlchemy, PyMySQL, and Boto3 dependencies.

  6. Challenge

    Create a Database in Your RDS Instance to Populate with Mock Data

    • From the Cloud9 console, connect to your RDS instance.
    • Create an empty database to populate with mock data.

      Note: Make sure the name of this database matches the database name defined in your code.

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.