How to pass AWS Session as environment dependency in TileFactory ? #999
Unanswered
AbhishekD15
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I don't think this will change the result but usually I would do it like: def environment_dependency():
session = get_assumed_role_session()
aws_session = AWSSession(session)
return {'session': aws_session}
endpoints = TilerFactory(environment_dependency=environment_dependency) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a private s3 bucket. I would like to access the Object URL from the routes defined in Tilefactory.
I have a role that I am using to create an AWS session. I would like TilerFactory to include AWS session in the environment. What I am doing atm is creating a custom TileFactory and using the environment_dependency top inject the AWS session.
from rasterio.session import AWSSession
The
get_assumed_role_session()
returns a session using the role to access the private bucket.Unfortunately still getting 403. Could someone please guide me ? Thanks
Beta Was this translation helpful? Give feedback.
All reactions