title: Boto: uploading multiple files to s3
body: <p>I am a JavaScript/Angular 2 developer who is now getting involved with deployment using Bitbucket pipelines, Python and Boto for s3 integration. I was only introduced to these three technologies yesterday!</p>
  
  <p>My webpack build produces a folder, <code>dist</code>, that contains all of the files I would like to upload to s3. I would like these files to appear in the root of the s3 bucket.</p>
  
  <p>I have the following in my <code>bitbucket-pipelines.yaml</code>:</p>
  
  <pre><code>image: node:5.6.0
  
  pipelines:
    default:
      - step:
          script:
            # other stuff..,
            - python s3_upload.py io-master.mycompany.co.uk dist io-dist 
  </code></pre>
  
  <p><a href="https://bitbucket.org/awslabs/amazon-s3-bitbucket-pipelines-python/src/d1a2cd2355813b62621d8fedc9e100acf9adb228/s3_upload.py?at=master&amp;fileviewer=file-view-default" rel="nofollow">Here</a> is the entire Python <code>s3_upload.py</code></p>
  
  <p>As you can see, the script uses <code>put_object</code>:</p>
  
  <pre><code>client.put_object(
      Body=open(artefact, 'rb'),
      Bucket=bucket,
      Key=bucket_key
  )
  </code></pre>
  
  <p>What I would like to be able to do is upload the contents of the <code>dist</code> folder to s3. Do I have to learn Python in order to be able to do this, or is there a method in Boto to do this already?</p>