Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiling from private bucket (S3 Signed URLs) #8

Closed
geospatial-jeff opened this issue Aug 6, 2019 · 2 comments

Comments

@geospatial-jeff
Copy link

commented Aug 6, 2019

I'd like to dynamically tile some COGs stored in a private S3 bucket (no public access). I'm trying to do so with S3 signed URLs:

https://{bucket}.s3.amazonaws.com/{key}?AWSAccessKeyId={val}&Signature={val}&Expires={val}

This is causing an error when the URL is passed to lambda-proxy because AWSAccessKeyId, Signature and Expires are being treated as arguments rather than part of the URL:

[lambda-tiler] - [ERROR] - bounds_handler() got an unexpected keyword argument 'Expires'

I'm not set on using S3 Signed URLs in particular, so if there is a better way of authenticating a private bucket for use with the tiler which currently works please let me know.

@geospatial-jeff

This comment has been minimized.

Copy link
Author

commented Aug 6, 2019

I managed to get this working on single-band COGs by encoding the & as %26. Lambda-proxy no longer mistakes the S3 signed URL parameters as arguments and the tiler can successfully read and tile the image.

This fix does not work on multi-band COGs, and returns the following error:
[lambda-tiler] - [ERROR] - HTTP response code: 403 - Failed writing header

@vincentsarago

This comment has been minimized.

Copy link
Owner

commented Aug 6, 2019

thanks for the issue @geospatial-jeff,
Sadly this is a lambda-proxy issue, not sure there is an easy fix for this sadly.

please feel free to open an issue on lambda-proxy repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.