# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3 (ipykernel)
#     language: python
#     name: python3
# ---

# +
import boto3
import os
from botocore.config import Config

def s3_client():
    # connect to Secretless Broker for Credentials.
    s3 = boto3.client('s3',
                      aws_access_key_id="secretless",
                      region_name="us-east-1",
                      aws_secret_access_key="secretless",
                      endpoint_url="http://secretless.empty",
                      config=Config(proxies={'http': 'http://localhost:8099'}))
    return s3



# -

def list_buckets():
    bck_rep = s3_client().list_buckets()
    for buck in bck_rep["Buckets"]:
        print(buck)


# +

if __name__ == '__main__':
    list_buckets()


StarcoderdataJupyterScriptsDedupFiltered