add a script to test a list of buckets
This commit is contained in:
23
s3_bucket_list_fromfile.py
Normal file
23
s3_bucket_list_fromfile.py
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import boto3
|
||||||
|
import botocore
|
||||||
|
|
||||||
|
import json
|
||||||
|
import urllib
|
||||||
|
import logging
|
||||||
|
import sys,os
|
||||||
|
import pprint
|
||||||
|
|
||||||
|
pp = pprint.PrettyPrinter(indent=5, width=80)
|
||||||
|
|
||||||
|
from s3.s3 import *
|
||||||
|
|
||||||
|
AWS_ACCESS_KEY_ID = ''
|
||||||
|
AWS_SECRET_ACCESS_KEY =''
|
||||||
|
|
||||||
|
f = open('test.txt', 'r')
|
||||||
|
for line in f:
|
||||||
|
line = line.strip()
|
||||||
|
if not line:
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
get_s3bucket_policy(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,line)
|
||||||
Reference in New Issue
Block a user