Monthly DynamoDB procedure - best practices help

0

We run a system that collects data monthly, so we have several central tables, then more of a YYYY_MM structure. So days before the new month we are creating a table, setting capacity, PITR, etc. Then around the 6th, we will lower the capacity from the previous month, lower capacity, etc. and I want to automate this. The only thought I had was using an admin server with AWS keys, and writing a script using CLI tools. Naturally that user would need credentials, etc. but is there any other way that would be easier?

Also regarding the backup, if I am using AWS Backup, once the previous month is done, I am trying to find out how I am charged, if the data doesn't change and I leave the daily flag on, do I pay for more storage (the same data over and over) or is it just the one time as the data is the same as that will affect that part.

Thank you in advance.

質問済み 2年前299ビュー
2回答
1
承認された回答

My suggestion here would be to use Amazon EventBridge which invokes a Lambda function on monthly basis. The logic in your Lambda can be used to change the tables capacity settings etc.. I would also suggest looking into DynamoDB Standard-IA table class which may suit your use-case.

For Auth, you can attach an IAM role with the necessary permission to your Lambda function so it can make the desired updates. More here

For DynamoDB Backups, you are only charged for the data stored, so if the data does not change then your monthly bill will remain the same.

profile pictureAWS
エキスパート
回答済み 2年前
  • Leeroy - regarding the data stored pricing. How does it work if I make a tag called daily and after 30 days, that table stops getting written to, so in the aws backup I say to move to cold storage after 45 days? The data doesn't change, but does the backup script run, look and see no warm backup and make a new one, or is it smart enough to say I have a backup there, its in cold storage, no data change and do nothing and I keep the cold storage savings?

0

Thanks Leeroy, have never used EventBridge due to I am a bash/linux guy and Lambda doesn't support, but I keep saying I need to get on to Python so here is yet another reason!

Thanks much

回答済み 2年前
  • Honestly, you wont regret it. Its super powerful and easy to implement. If you need some examples to get you up in running with Python and DynamoDB, check out our repo here

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ