pull/39/head
Richard Liu 6 years ago
commit 50cf102f0f
  1. 9
      aws-experiment-launch/new_pipeline/upload_s3.py

@ -0,0 +1,9 @@
import boto3
s3 = boto3.client('s3')
bucket_name = 'first-try'
s3.create_bucket(Bucket=bucket_name,ACL='public-read-write')
response = s3.list_buckets()
buckets = [bucket['Name'] for bucket in response['Buckets']]
print("Bucket List: %s" % buckets)
filename='myfirst.txt'
s3.upload_file(filename, bucket_name, filename)
Loading…
Cancel
Save