9087a7f9301e17510bc903b9beb532bc7ae641fd,lambdas/access_counts/index.py,,handler,#Any#Any#,360

Before Change


    for account_response in s3.list_objects_v2(
            Bucket=CLOUDTRAIL_BUCKET, Prefix="AWSLogs/", Delimiter="/").get("CommonPrefixes") or []:
        account = account_response["Prefix"].split("/")[1]
        for region_response in s3.list_objects_v2(
                Bucket=CLOUDTRAIL_BUCKET,
                Prefix=f"AWSLogs/{account}/CloudTrail/", Delimiter="/").get("CommonPrefixes") or []:
            region = region_response["Prefix"].split("/")[3]
            date = start_ts.date()
            while date <= end_ts.date():

After Change


        accounts.append(account)

    // Does not make network calls; appears to be hardcoded in the botocore library.
    regions = boto3.Session().get_available_regions("s3")

    // Drop old Athena tables from previous runs.
    // (They"re in the DB owned by the stack, so safe to do.)
    run_multiple_queries([DROP_CLOUDTRAIL, DROP_OBJECT_ACCESS_LOG, DROP_PACKAGE_HASHES])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: quiltdata/quilt
Commit Name: 9087a7f9301e17510bc903b9beb532bc7ae641fd
Time: 2020-07-16
Author: dima@quiltdata.io
File Name: lambdas/access_counts/index.py
Class Name:
Method Name: handler


Project Name: ContextLab/hypertools
Commit Name: 1b530219aa8dcf7d25a7e43b36ba357b19ba46e1
Time: 2018-02-15
Author: andrew.heusser@gmail.com
File Name: hypertools/tools/load.py
Class Name:
Method Name: _load_stream


Project Name: home-assistant/home-assistant
Commit Name: e0dd5a855870e007cc7c8900d79d73e8d56ce971
Time: 2016-07-11
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/recorder/__init__.py
Class Name: Recorder
Method Name: run