Skip to content

Commit

Permalink
NRL-817 Faster permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
axelkrastek1-nhs committed Jul 1, 2024
1 parent 04621be commit 970a497
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions scripts/get_s3_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,20 @@ def main(env: str, path_to_store: str):

boto_session = get_boto_session_for_account(account_id)

permissions_path = path.abspath(path.join(path_to_store + "/nrlf_permissions"))
permissions_file_path: Path = Path.joinpath(permissions_path, "permissions.toml")

s3 = boto_session.client("s3")
files, folders = get_file_folders(s3, bucket)

download_files(
s3,
bucket,
path.abspath(path.join(path_to_store + "/nrlf_permissions")),
files,
folders,
)
s3.download_file(bucket_name, permissions_file_path.name, permissions_file_path)
# files, folders = get_file_folders(s3, bucket)

# download_files(
# s3,
# bucket,
# path.abspath(path.join(path_to_store + "/nrlf_permissions")),
# files,
# folders,
# )
print("Downloaded S3 permissions...")


Expand Down

0 comments on commit 970a497

Please sign in to comment.