DEV Community

jss475
jss475

Posted on

Creating Seed Data in AWS Amplify/Studio

Hey everyone!

I just started trying to use AWS Amplify to deploy one of my old projects and boy did I have some trouble haha.

AWS Amplify uses GraphQL or allows use to use a REST API. I wanted to learn more about GraphQL so I went with that route for my personal project. Understanding the basic concepts of GraphQL were not too difficult and luckily AWS has plenty of documentation to help with that as well. Here's a link to one of the documentation that helped me a lot: https://docs.amplify.aws/lib/graphqlapi/getting-started/q/platform/js/

Once you set up your project and your backend, you may want to have some seed data. For my project specifically, I wanted to add in restaurants for my "Food Journal" project. A nice visual way to set that up is by using Amplify Studio. With your backend schema already set up, you can go to the page below:

AWS Amplify Backend Environment

Once you're at the backend environment, click "Actions" and then "Launch Studio." This should take you the following page:

AWS Amplify Studio

Navigate to the "Content" link under "Manage" in the sidebar on the left.

Once there, you can click on "Action" to "Auto Generate Data" (when you want to seed more than one instance with fake data) or click "Create (table name)".

Seed your data!

You should now be able to seed your data!

Hope this helped!

Top comments (0)