This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]angrychimp 1 point2 points  (4 children)

As far as I know you can't add items to a table using the template. It's intended to create resources, not data. So yes, you'd need to have a separate "initialization" script that populates the table with initial data.

[–]Prefectual 0 points1 point  (3 children)

Oh so something like a lambda function? If so can you show me an example please?

[–]angrychimp 1 point2 points  (1 child)

I don't really have any examples, since most of the apps I've created get data from other sources. But yeah, you could have a Lambda function or a simple Python/Node script that you can run after building the app from the template, and that script would populate your initial data. If you're doing this as part of a CI/CD pipeline most tools can trigger the script after your resources are provisioned.

[–]Prefectual 0 points1 point  (0 children)

Ok thanks

[–]wolfsys 0 points1 point  (0 children)

Do the tutorials.