소스 검색

Simple connection with boto3 on local bucket

DricomDragon 4 년 전
부모
커밋
885920dddc
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      boto-updater.py

+ 8 - 0
boto-updater.py

@@ -0,0 +1,8 @@
+import boto3
+
+# Main
+s3 = boto3.resource('s3', use_ssl=False, endpoint_url="http://172.17.0.2:9000", aws_access_key_id="minio", aws_secret_access_key="miniokey")
+
+# Print out bucket names
+for bucket in s3.buckets.all():
+    print(bucket.name)