Skip to content

Conversation

michaeldjeffrey
Copy link
Contributor

@michaeldjeffrey michaeldjeffrey commented Jul 17, 2025

Still to be done

Version Updates

crate old new
aws-config 0.51.0 1.8.2
aws-sdk-sts 0.21.0 1.76.0
aws-credential-types 0.54.1 1.2.4
aws-smithy-http 0.51.0 removed
aws-types 0.51.0 1.3.7
aws-sig-auth 0.51.0 removed
aws-sigv4 0.51.1 1.3.3
aws-sdk-s3 0.21.0 1.98.0
aws-smithy-types-convert -- 0.60.9

Helium Crypto

Updating AWS deps was initially fraught with danger because of crypto libraries used for signing. Mainly the signature crate that provided the Signature trait.

See: helium/helium-crypto-rs#74

Clippy Updates

1.86.0

aws-sdk-sts has a msvr of 1.86.0.

rust-toolchain.toml was updated, along with coverage-point-calculator and custom-tracing for new clippy warnings.
Those were path.next_back() and std::iter::repeat_n().

1.87.0

  • Wrapped a file store error in a Box.
  • Used file_store::Error::other() constructor

1.88.0

String formatting updates.

Clippy enforces inlining a variable into format! when possible.

clippy.toml

cargo 1.87.0 added a clippy lint for large err variants in results (default: 128).
https://rust-lang.github.io/rust-clippy/master/index.html#/large_err

Until Tonic updates, I've set clippy to report on variants 1 byte larger than tonic::Status (176 bytes).

We can remove this lint once hyperium/tonic#2253 has a PR branch and is merged. And we can update from tonic 0.10 to 0.13.x.

DB Store

generate_rds_iam_token() needed to be updated to use aws-sigv4 instead of aws-sig-auth.

This commit (64632a3) was the point in time where I had both versions running to ensure they produced the same iam token.

File Store

features=local and path style enforcement

The local feature flag no longer includes aws-types.
Credentials are now provided by their own aws-sdk-* crate.

The local feature now enforces path style access to s3 buckets.

Path style access is a slow deprecation being replaced by DNS resolution for buckets.

However, when running against a localstack or minio, unless you want to setup some custom DNS rules on in your dev environment, path style access is still the way to go.

Boxing AWS Errors

Clippy has started complaining about Errors and Results that have large variants.
The compiler doesn't know what error might be throw so has to allocate enough space for the largest possible error.

One of the ways around this, is to Box potentially large errors.

into_stream_03x()

Somewhere around aws-sdk-s3@1 the paginated version of ListObjectsV2 lost the ability to be turned into a flat stream.
aws-smithy-types-convert was provided as a way to bring that back.

smithy-lang/smithy-rs#3299 explains the bizarre naming.

@michaeldjeffrey
Copy link
Contributor Author

Given the issue with building a release with the updated aws dependencies (mainly aws-lc-sys), this PR is waiting until we've completed the migration to kubernetes.

It might be larger than the other error variants enough that clippy is complaining about it.
I think it would be a good idea to roll this into file-store at some point to remove the need to keep them in line.
Path Style requests are being slowly deprecated. Fortunately, the s3_config still provides a way to override this setting.

This is mostly for testing locally with minio or localstack, as you would need to setup some DNS rules for your localhost to get virtual-hosted style paths to work.

https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html
This commit exists with both version so they can be compared in history, and in to show that there was a time where it was known that both functions generated the same token.
- remove old aws crates
- consolidate signing errors
- remove invalid auth token error, we construct the url almost statically
Group them all together to try and reduce the amount of version hunting we need to do next time we need to update a dep.
We can remove this lint once # 
hyperium/tonic#2253
 has a PR branch and is merged. And we can update from tonic `0.10` to 
 `0.13.x`.
It has been removed in updated version of aws sdks, there are ways to
handle it, but they're much more involved.

We can test with updated versions of loading credentials, and it we're
still getting timeout failures for price tracker, we can consider adding
it back in with the new style.
We have an array, and try_from works on a slice of u8.
tonic is no longer exported from helium-proto, we define it as a dep,
and it picks up it's version from helium-lib.
it will pick up it's version from the re-export of http-serde
@michaeldjeffrey
Copy link
Contributor Author

Latest set of updates caused by helium-proto helium/proto#459

  • update helium-lib
  • update helium-proto
  • tonic and prost versions picked up from helium-proto
    • tonic no longer exported from helium-proto, fix imports
  • removed credential_load_timeout in file_store
    • functionality was removed many versions back in aws-s3-sdk, if we still have problems we can attempt to recreate it with the new structure, but it's a bit more involved.
  • remove calls and tests to gateway service info v1.

@michaeldjeffrey
Copy link
Contributor Author

In effort to get these changes landed before the full switchover of iot to kubernetes. Builds are now using the AWS_LC_SYS_CMAKE_BUILDER=1 option so aws-lc-sys will use a non-bugged version of cc for building in an unbuntu:20.04 environment.

@michaeldjeffrey michaeldjeffrey merged commit 3ed7516 into main Sep 15, 2025
115 checks passed
@michaeldjeffrey michaeldjeffrey deleted the mj/update-aws-deps branch September 15, 2025 16:27
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.

4 participants