Read ESA WorldCover anonymously so SSO AWS configs don't crash reports#124
Merged
Conversation
_sample_worldcover_into_gdf opened the public ESA WorldCover S3 COGs with
rasterio's default AWS session, which eagerly resolves credentials. On a
machine whose ~/.aws/config uses an SSO/login provider, botocore raised
MissingDependencyException ('requires botocore[crt]'), aborting the whole
asp_plot report — even though the bucket is public and needs no credentials.
Use an explicit unsigned session (AWSSession(aws_unsigned=True)) so anonymous
access is used regardless of the user's AWS configuration.
Bumps version to 1.15.2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Altimetry._sample_worldcover_into_gdf()reads the public ESA WorldCover 10 m COGs from S3, but opened them with rasterio's default AWS session, which eagerly resolves AWS credentials. On a machine whose~/.aws/configuses an SSO/login provider, botocore raises:…which aborts the entire
asp_plotreport during the ICESat-2 WorldCover landcover step — even though the bucket is public and needs no credentials at all.Fix
Open the COGs with an explicit unsigned session:
aws_unsigned=Trueskips credential resolution entirely, so anonymous access is used regardless of the user's AWS configuration.Verification
Reproduced and fixed against the offending machine config (no env-var workarounds):
This surfaced while validating #121's
--reuse_selectionson a real Earth (ASTER) example; users currently work around it withAWS_NO_SIGN_REQUEST=YES AWS_CONFIG_FILE=/dev/null, which this fix makes unnecessary.Notes
rasterio.session.AWSSessionis already available via the existing rasterio dependency.