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

AWS url-endpoint upload issue, bib does not pick up endpoint / use it #501

Open
cdrage opened this issue Jun 25, 2024 · 2 comments
Open
Assignees

Comments

@cdrage
Copy link
Contributor

cdrage commented Jun 25, 2024

Within my .aws/credentials, I have an endpoint_url for my own S3 endpoint (s3 compatible minio server). However, bib does not pick the endpoint URL up (most other aws-upload-like-tools-do).

Other AWS-like tools authenticate no problem, but I'm unable to do it with bib.

▶ cat .aws/credentials
[default]
endpoint_url = http://<MY-CUSTOM-URL>:9000
aws_access_key_id = <REDACTED>
aws_secret_access_key =  <REDACTED>

bib should be able to pick this up from the credentials file.

bib output:

podman run --rm \
  --name nvidia-3060-bootc-image-builder \
  --tty \
  --privileged \
  --security-opt label=type:unconfined_t \
  -v /Users/cdrage/bootc/aws:/output/ \
  -v /var/lib/containers/storage:/var/lib/containers/storage \
  -v /Users/cdrage/.aws:/root/.aws:ro \
  --label bootc.image.builder=true \
  quay.io/centos-bootc/bootc-image-builder:latest-1714633180 \
  foobar.com/private/nvidia-3060:latest \
  --output \
  /output/ \
  --local \
  --type \
  ami \
  --target-arch \
  amd64 \
  --rootfs \
  xfs \
  --aws-ami-name \
  foobar \
  --aws-bucket \
  foobar \
  --aws-region \
  us-east-1
Error: cannot handle AWS setup: retrieving AWS regions for 'us-east-1' failed: AuthFailure: AWS was not able to validate the provided access credentials
	status code: 401, request id: 7d21a8d9-e109-445a-aec9-02d9e3f774de
2024/06/25 19:15:22 error: cannot handle AWS setup: retrieving AWS regions for 'us-east-1' failed: AuthFailure: AWS was not able to validate the provided access credentials
	status code: 401, request id: 7d21a8d9-e109-445a-aec9-02d9e3f774de
@ondrejbudai
Copy link
Member

@schuellerf can you take a look when you have a less busy moment?

@schuellerf schuellerf self-assigned this Jul 8, 2024
@schuellerf
Copy link
Contributor

schuellerf commented Jul 8, 2024

From my first investigations it might be caused by the underlying library not respecting the config. Actually also ignoring a potential .aws/config file, too (maybe related to this aws/aws-sdk-go#1048 (comment) ) .
The current issue could be resolved once we move to v2 osbuild/images#788
I can also implement a command line argument for now but this has to be done in our library and then implemented here. I'll align with the team which approach is best here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants