stac-utils / stac-utils/rustac-py

`rustac.search_to` with a S3 file does not use `~/.aws/credentials` to authenticate

Open
#312 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Python
Stars
54
Forks
5
Avg merge
32m
Merged PRs (30d)
1

Description

When calling rustac.search_to with outfile=s3://my-bucket/some/file.geoparquet, it fails if there are no AWS env vars set with this error:

rustac.RustacError: Generic S3 error: Error performing PUT http://169.254.169.254/latest/api/token in 7.662460333s, after 10 retries, max_retries: 10, retry_timeout: 180s  - HTTP error: error sending request

However, I do have the file ~/.aws/credentials with my credentials, which is standard practice. If I explicitly set the AWS_* env vars, it works just fine, meaning it's not a code or setting problem. It would be nice if rustac could read the credentials file if the env vars are not provided.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the rustac.search_to entry point when outfile uses an s3:// URL, and reproduce the failure with AWS environment variables unset but ~/.aws/credentials present. Check how authentication is selected for the S3 PUT; done means credentials from that file allow the output to be written without AWS_* variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.