Skip to content

Instantly share code, notes, and snippets.

@andrewljohnson
Created March 24, 2016 04:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewljohnson/f07fb4591739e13d70a5 to your computer and use it in GitHub Desktop.
Save andrewljohnson/f07fb4591739e13d70a5 to your computer and use it in GitHub Desktop.
download a naip from an s3 RquesterPayer bucket, using boto3
import boto3
def download_naips(self):
s3_client = boto3.client('s3')
filename = 'm_3807708_ne_18_1_20130924.tif'
s3_client.download_file('aws-naip', 'md/2013/1m/rgbir/38077/{}'.format(filename), filename, {'RequestPayer':'requester'})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment