AWS SDK tries to derive credentials from EC2 metadata endpoint before looking into the environment #1125
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
When trying to connect to an S3 store (e.g. by having
store_uri = s3://...in Hydra or just--store s3://...on the Nix CLI), several connection attempts to the metadata endpoint are being made before falling back to fetching credentials from the environment:Ways to work around this are
export AWS_REGION=eu-west-1)AWS_EC2_METADATA_DISABLED=truein your env (see also https://cl.afnix.fr/c/infra/+/450)Steps To Reproduce
AWS_AWS_ACCESS_KEY_ID&AWS_SECRET_ACCESS_KEYto your envnix store ping --store "s3://bucket?endpoint=example.com®ion=eu-west-1"Expected behavior
I wouldn't expect the SDK trying to connect to the EC2 metadata endpoint in the first place.
Or at least coverage in the documentation.
I'm open for discussion on what the most sensible behavior would be, but I'd like to not have 10s of silence before any store operations happen on my machines without any interaction.
nix --versionoutputAdditional context
Add any other context about the problem here.