Hello all! I'm pretty new at this serverless stuf...
# help
f
Hello all! I'm pretty new at this serverless stuff and I do see this as the way of the future. DynamoDB is a bit of a challenge for me given that it's very different than my relational background. My application is in need of what would be normally a lookup table with just under 200 rows. The data is pretty static, meaning it's very unlikely to change. Is this something that would be best practice to setup in a stack - define a DynamoDB table and load it with the static data? Or would it be better to simply create a constant in the code and hard coded values?
t
Probably not worth keeping in dynamo unless you need to manage the values of the data frequently and want to enable non engineers to do that
Otherwise a JSON file loaded into memory works well
r
Retrieving it from parameter store is an option. Store it as a JSON value, retrieve and store it outside your handler
t
That's a cool idea too. Comes down to whether you want to put it in VCS and require a deploy to update it or put it somewhere more runtime
f
I think the idea of a JSON file makes the most sense. What's VCS? Given how static the data is, doing a deploy to modify it is probably fine given how rarely that's going to happen.
t
version control system (assuming git in your situation)
I'm pretty sure you could just
import data from "./mydata.json"
in your code and it'll be bundled
f
Cool! Thanks for the help.