Skip to content

Upgrading to AWSSDK.S3 v4 breaks S3 HealthCheck #2389

@tbright92

Description

@tbright92

Please, fill the following sections to help us fix the issue

What happened: After updating to the latest major version of AWSSDK.S3, my S3 HealthCheck is getting the following error:

System.MissingMethodException: Method not found: 'Void Amazon.S3.Model.ListObjectsRequest.set_MaxKeys(Int32)'.
   at HealthChecks.Aws.S3.S3HealthCheck.CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at HealthChecks.Aws.S3.S3HealthCheck.CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken)
   at Microsoft.Extensions.Diagnostics.HealthChecks.DefaultHealthCheckService.RunCheckAsync(HealthCheckRegistration registration, CancellationToken cancellationToken)

What you expected to happen: S3 HealthCheck is able to run successfully.

How to reproduce it (as minimally and precisely as possible): Updating to the latest version of AWSSDK.S3 and adding an S3 HealthCheck.

Source code sample:

Anything else we need to know?: I believe this is happening because v4 of AWSSDK changed the type of MaxKeys from Int32 to Nullable Int32.

Environment:

  • .NET Core version: .NET 9
  • Healthchecks version: 9.0.0
  • Operative system: Windows
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions