Skip to content

fix: create AWS config file to suppress post-build-hook errors#2042

Merged
jfroche merged 2 commits intodevelopfrom
fix/other-nix-copy-errors
Feb 10, 2026
Merged

fix: create AWS config file to suppress post-build-hook errors#2042
jfroche merged 2 commits intodevelopfrom
fix/other-nix-copy-errors

Conversation

@jfroche
Copy link
Collaborator

@jfroche jfroche commented Feb 10, 2026

The post-build-hook runs nix copy --to s3://... which now uses libcurl AWS authentication since the last 2.33 release (see https://releases.nixos.org/nix/nix-2.33.0/manual/release-notes/rl-2.33.html#s3-improvements). It attempts to read /root/.aws/config for profile configuration, but only /root/.aws/credentials was created by aws configure set (credential keys write to the credentials file, not the config file). This produced errors in CI logs:

[ERROR] static: Failed to open file. path:'/root/.aws/config'
[ERROR] Failed to build config profile collection from file at (/root/.aws/config) : Invalid file path

Setting the region via aws configure set region creates the config file, resolving the missing file errors.

We also upgrade nix to 2.33.2 to benefit the AWS log improvement made in NixOS/nix#15059

The post-build-hook runs `nix copy --to s3://...` which now uses libcurl AWS authentication since the last 2.33 release (see https://releases.nixos.org/nix/nix-2.33.0/manual/release-notes/rl-2.33.html#s3-improvements).
It attempts to read /root/.aws/config for profile configuration, but only /root/.aws/credentials was created by `aws configure set` (credential keys write to the credentials file, not the config file). This produced errors in CI logs:

  [ERROR] static: Failed to open file. path:'/root/.aws/config'
  [ERROR] Failed to build config profile collection from file

Setting the region via `aws configure set region` creates the config file, resolving the missing file errors.
2.33.2 has a fix to improve aws logs: NixOS/nix#15059

It should suppress logging error like:

```
[AuthCredentialsProvider] - Failed to resolve role arn during sts web identity provider initialization.
```

Note that it doesn't prevent the copy operation from succeeding, so it's not a critical issue, but it does make logs cleaner and easier to read.
@jfroche jfroche marked this pull request as ready for review February 10, 2026 11:21
@jfroche jfroche requested review from a team as code owners February 10, 2026 11:21
@jfroche jfroche self-assigned this Feb 10, 2026
@jfroche jfroche added this pull request to the merge queue Feb 10, 2026
Merged via the queue into develop with commit fbc4bf1 Feb 10, 2026
35 of 37 checks passed
@jfroche jfroche deleted the fix/other-nix-copy-errors branch February 10, 2026 16:24
encima pushed a commit that referenced this pull request Feb 23, 2026
* fix: create AWS config file to suppress post-build-hook errors

The post-build-hook runs `nix copy --to s3://...` which now uses libcurl AWS authentication since the last 2.33 release (see https://releases.nixos.org/nix/nix-2.33.0/manual/release-notes/rl-2.33.html#s3-improvements).
It attempts to read /root/.aws/config for profile configuration, but only /root/.aws/credentials was created by `aws configure set` (credential keys write to the credentials file, not the config file). This produced errors in CI logs:

  [ERROR] static: Failed to open file. path:'/root/.aws/config'
  [ERROR] Failed to build config profile collection from file

Setting the region via `aws configure set region` creates the config file, resolving the missing file errors.

* feat: upgrade nix to 2.33.2

2.33.2 has a fix to improve aws logs: NixOS/nix#15059

It should suppress logging error like:

```
[AuthCredentialsProvider] - Failed to resolve role arn during sts web identity provider initialization.
```

Note that it doesn't prevent the copy operation from succeeding, so it's not a critical issue, but it does make logs cleaner and easier to read.
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

Successfully merging this pull request may close these issues.

2 participants