One of the reasons AWS CDK has me so intrigued is the promise of being able to spin up environments in minutes. If I can provision all my infrastru...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Matt,
I wrote an article on Importing data into DynamoDB as fast as possible with as little as possible effort. rehanvdm.com/serverless/dynamodb-i...
So you can put your Custom Resource on steroids if you rather pass the S3 path to the data you want to import as a param. Then stream from S3 and write to Dynamo in parallel.
I only started to play with CDK a week ago and absolutely love it, it is a must for anyone doing raw cloud formation.
Those are some great insights, thanks Rehan! I've been working on generating the data in a lambda and loading it - this should help a lot. I also think that teams might want to check a csv into source control representing different scenarios (for test automation, for example) that could get automatically provisioned and streamed to the DB.
Yes brilliant idea, new environments will then have consistent data after being created, great for testing scenarios.
Heads up for anyone happening across this article: The code is pretty much out of sync with the latest versions of the CDK packages and won't run as-is.
Hey Andrew, I just updated my repo to the latest cdk and everything still works fine. There aren't any deprecated constructs here. Can you be more specific about the issue you had?
I'm not sure how that's possible. With the latest version the CDK you literally cannot set
physicalResourceId: 'initDBData'
. You have to use one of the two static methods listed here: docs.aws.amazon.com/cdk/api/latest...So you didn't even try it? Well thanks for stopping by.
your snide reply aside, for anyone happening across this post, it's not an accurate source of truth.
Not sure if you just misread the docs or if something else is going on, but here is the official docs with that property being set:
docs.aws.amazon.com/cdk/api/latest...
Here is my code doing the exact same thing!
github.com/elthrasher/cdk-dynamo-c...
Notice the static method you referenced is on the right side of the assignment. Now is there an improvement you'd like to suggest?