Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Code Block
languagepy
#!/usr/bin/env python 

import boto3

session = boto3.session.Session()

s3_client = session.client(
	service_name='s3',
	aws_access_key_id='<username>',
	aws_secret_access_key='<password>',
	endpoint_url='<endpoint-url>'
)

buckets = s3_client.list_buckets()

print('My Buckets:')
for bucket in buckets['Buckets']:
	print(bucket)

...