Export dynamodb data as Excel files

0

Hey,

We just changed to AWS Dynamodb and i was wondering what is the best way for exporting the data to an Excel file. This should be automated later on . Is it with AWS S3 or with some python programming? Can't find a clear solution online so thats why i'm asking.

Any suggestions?

Thanks!

4 Antworten
1

Depending on what is your goal, I would look into 3 options:

  1. If you want to just dump, a quick script in language you prefer would do the job
  2. If you want to dump periodically, I would suggest to make Lambda out of it - here is a result of quick googling with working example: https://medium.com/@jrodl3r/exporting-dynamodb-data-to-excel-using-lambda-with-s3-on-aws-e6f873681c77
  3. If you need to work dynamically with the given data, let`s say to slice & dice, filter, etc analyse it by users - consider using AWS Quicksight with DynamoDB as data source.
wieshka
beantwortet vor einem Jahr
1

DynamoDB does not provide the ability to export the entire table to CSV, only a small sub-set.

The best way I have found is using Athena's capability to export to CSV, this is done using the

The next suggestion approach is to come up with your own logic/script to export the table to CSV using Lambda and Event Bridge to periodically kick off the job. There are many tools available to assist you with converting JSON to CSV and even tools to do the entire process for you such as:

And finally, if your table is really large you can use AWS Glue to run a periodic ETL job which will read from DynamoDB and export to CSV in an S3 Bucket:

Overall it depends on your specific use-case needs on which option to use.

profile pictureAWS
EXPERTE
beantwortet vor einem Jahr
0

I think the second option is the one we go with. Just dumping periodically. But this is more for sending it through email? is their a way to store it in ... a bucket?

beantwortet vor einem Jahr
  • That`s depending on what you implement in the given Lambda code - from there you can both send to e-mail (via AWS SES), and as well park in the S3 bucket. Or, send an e-mail of the new dump being created on S3 with a pre-signed download URL for convenience. Since you mentioned Python - boto3 is your friend.

0

I was planning to create a lambda with an Event bridge. And storing the file on aws S3. Should that be the best way? So we can download Excel files from the bucket or can we acces Excel in aws it self?

beantwortet vor einem Jahr
  • You can use comments to post comments under posts to avoid creating multiple answers.

    Yes, that would be the best way in my opinion, there is multiple libraries that allow you to convert JSON to CSV and then store in S3. You can then share pre-signed URL's with others who can then download your files.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen