INNER CODE UNIT · Python

setup_dynamodb

mlevit/aws-auto-cleanup · app/src/main.py:422

    def setup_dynamodb(self):
        """
        Inserts all the default settings and allowlist data
        into their respective DynamoDB tables. Records will be
        skipped if they already exist in the table.
        """
        try:
            client = boto3.client("dynamodb")

            with open("./src/data/auto-cleanup-settings.json") as settings_data:
                settings_json = json.loads(settings_data.read())

            with open("./src/data/auto-cleanup-allowlist.json") as allowlist_data:
                allowlist_json = json.loads(allowlist_data.read())

            update_settings = False

            # get current settings version

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…