DynamoDB Dynomite Seed Data

Important: These docs are for the outdated Jets 5 versions and below. For the latest Jets docs: docs.rubyonjets.com

You can seed data with

jets dynamodb:seed

It’ll load the Jets environment and load the dynamodb/seeds.rb file. Here’s an example:

dynamodb/seeds.rb

Post.find_or_create_by!(title: "post 1")
Post.find_or_create_by!(title: "post 2")
Post.find_or_create_by!(title: "post 3")
puts "posts created"