Skip to content

chore: Update AWS SDK to v2 - #19205

Merged
sophiewaldman merged 10 commits into
mainfrom
awsupdate
Sep 26, 2025
Merged

chore: Update AWS SDK to v2#19205
sophiewaldman merged 10 commits into
mainfrom
awsupdate

Conversation

@sophiewaldman

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
The first version of the AWS SDK for Go reached end of support on 2025-07-31. This PR migrates us to V2 of the SDK which is still supported.

Which issue(s) this PR fixes:
Fixes https://github.com/grafana/loki-private/issues/1426

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
@sophiewaldman
sophiewaldman marked this pull request as ready for review September 26, 2025 17:33
@sophiewaldman
sophiewaldman requested a review from a team as a code owner September 26, 2025 17:33

@paul1r paul1r left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@sophiewaldman
sophiewaldman merged commit e35887b into main Sep 26, 2025
66 checks passed
@sophiewaldman
sophiewaldman deleted the awsupdate branch September 26, 2025 20:39
chaudum added a commit that referenced this pull request Dec 4, 2025
This PR fixes a regression in how Loki's S3 configuration options are
handled to create the S3 client which was introduced with the upgrade of
the AWS SDK from v1 to v2 (#19205).

With the v1 SDK the `s3` field of the `aws` configuration block was
parsed to extract credentials, region, host, and schema.

```
storage_config:
  aws:
    s3: s3://<accesskey>:<secret>@<endpoint_or_region>/<bucketnames>
```

After the upgrade, only credentials were extraced, leaving all other
parts of the URL as default, which would require explicit overrides.

This was a breaking change and not documented in the upgrade notes. We
want to keep backwards compatibility, even though the Thanos object
client is going to supersed the custom S3/GCS/... clients.

ref: #19908
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
chaudum added a commit that referenced this pull request Dec 4, 2025
### Summary

This PR fixes a regression in how Loki's S3 configuration options are handled to create the S3 client which was introduced with the upgrade of the AWS SDK from v1 to v2 (#19205).

With the v1 SDK the `s3` field of the `aws` configuration block was parsed to extract credentials, region, host, and schema.

```
storage_config:
  aws:
    s3: s3://<accesskey>:<secret>@<endpoint_or_region>/<bucketnames>
```

After the upgrade, only credentials were extraced, leaving all other parts of the URL as default, which would require explicit overrides.

This was a breaking change and not documented in the upgrade notes. We want to keep backwards compatibility, even though the Thanos object client is going to supersed the custom S3/GCS/... clients.

ref: #19908

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
loki-gh-app Bot pushed a commit that referenced this pull request Dec 4, 2025
### Summary

This PR fixes a regression in how Loki's S3 configuration options are handled to create the S3 client which was introduced with the upgrade of the AWS SDK from v1 to v2 (#19205).

With the v1 SDK the `s3` field of the `aws` configuration block was parsed to extract credentials, region, host, and schema.

```
storage_config:
  aws:
    s3: s3://<accesskey>:<secret>@<endpoint_or_region>/<bucketnames>
```

After the upgrade, only credentials were extraced, leaving all other parts of the URL as default, which would require explicit overrides.

This was a breaking change and not documented in the upgrade notes. We want to keep backwards compatibility, even though the Thanos object client is going to supersed the custom S3/GCS/... clients.

ref: #19908

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit d3f9532)
nlowe added a commit to nlowe/homelab that referenced this pull request Dec 6, 2025
Loki 3.6.x had an unlisted breaking change in s3 endpoint parsing
due to an AWS SDK Upgrade and is broken until 3.6.3. See the following:

* grafana/loki#19205
* grafana/loki#19908
* grafana/loki#20110
* grafana/loki#20120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants