Re: rasterio opens file from AWS S3 bucket on local machine, but can't find file when deployed to Google App Engine
Sorry, I’ll try to be a bit more explicit. I’m getting the following error after setting the keys in my app.yaml file. I’m entirely sure what it means but wonder if it has something to do with trying to run it on GAE.
Traceback (most recent call last): File "rasterio/_base.pyx", line 216, in rasterio._base.DatasetBase.__init__ File "rasterio/_shim.pyx", line 67, in rasterio._shim.open_dataset
File "rasterio/_err.pyx", line 205, in rasterio._err.exc_wrap_pointer rasterio._err.CPLE_HttpResponseError: CURL error: error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
From: <email@example.com> on behalf of "Sean Gillies via groups.io" <sean@...>
Reply-To: "firstname.lastname@example.org" <email@example.com>
Date: Friday, August 14, 2020 at 7:03 PM
To: "firstname.lastname@example.org" <email@example.com>
Subject: Re: [rasterio] rasterio opens file from AWS S3 bucket on local machine, but can't find file when deployed to Google App Engine
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
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.
Join firstname.lastname@example.org to automatically receive all group messages.