Re: rasterio opens file from AWS S3 bucket on local machine, but can't find file when deployed to Google App Engine

Sean Gillies

Hi Judson,

On Wed, Aug 12, 2020 at 9:42 AM Judson Buescher <judson.buescher@...> wrote:

Hi Sean,

The only way that I’m installing the package is through my requirements.txt which I include in my deploy folder. I have




in the requirements.txt. For the credentials I’ve tried a couple different ways. I’ve tried setting them using


os.environ['GS_SECRET_ACCESS_KEY'] = secret_access_key

os.environ['GS_ACCESS_KEY_ID'] = access_key


I’ve also tried


session = boto3.Session(aws_access_key_id=access_key,



and then using that session object when I open the raster file. Was there any other info you’d like?

Thanks a ton for the help,

If the source data for your App Engine app is on AWS, you'll need to make sure that you're providing AWS keys to access it.  You'll want

    AWS_SECRET_ACCESS_KEY = secret_access_key

in your environment, not GS_SECRET_ACCESS_KEY (etc.). I've never used boto3 on App Engine and wouldn't recommend that approach of configuring AWS for GDAL and rasterio.

Sean Gillies

Join to automatically receive all group messages.