question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use this library with newer versions of the AWS SDK

See original GitHub issue

A very common issue being reported when trying to install this package in a project using packages of the AWS SDK newer than 3.3.

This issue is caused because the AWS SDK has strict version boundaries forcing the usage of packages within the same major version family (e.g. you can’t mix the AWS S3 3.5 package with AWS EC2 3.3 package).

This library is built targeting the AWS SDK 3.3 but, unlike the AWS SDK, it doesn’t have strict limits on the targeted AWS SDK version so it’s possible to use this library in projects targeting the AWS SDK 3.4 or newer.

To do so, you can simply leverage the automatic assembly redirect built into the .NET SDK projects.

Normally your project file would look like

<ItemGroup>
 <PackageReference Include="Kralizek.Extensions.Configuration.AWSSecretsManager" Version="1.5.0" />
</ItemGroup>

Let’s assume you wanted to add the latest package for S3, you would do

$> dotnet add package AWSSDK.S3

This would give you the following message

error: NU1107: Version conflict detected for AWSSDK.Core. Install/reference AWSSDK.Core 3.5.2.9 directly to project SecretsManagerSDK to resolve this issue.
error:  SecretsManagerSDK -> AWSSDK.S3 3.5.8.4 -> AWSSDK.Core (>= 3.5.2.9 && < 3.6.0)
error:  SecretsManagerSDK -> Kralizek.Extensions.Configuration.AWSSecretsManager 1.5.0 -> AWSSDK.SecretsManager 3.3.0 -> AWSSDK.Core (>= 3.3.21.20 && < 3.4.0).
info : Package 'AWSSDK.S3' is compatible with all the specified frameworks in project 'C:\Development\Tests\SecretsManagerSDK\SecretsManagerSDK.csproj'.
info : PackageReference for package 'AWSSDK.S3' version '3.5.8.4' updated in file 'C:\Development\Tests\SecretsManagerSDK\SecretsManagerSDK.csproj'.
info : Committing restore...
info : Writing assets file to disk. Path: C:\Development\Tests\SecretsManagerSDK\obj\project.assets.json
log  : Failed to restore C:\Development\Tests\SecretsManagerSDK\SecretsManagerSDK.csproj (in 233 ms).

To solve this issue, first install the latest version of AWSSDK.SecretsManager

$> dotnet add package AWSSDK.SecretsManager

Then, install the S3 package

$> dotnet add package AWSSDK.S3

Your project file will eventually look like this

<ItemGroup>
  <PackageReference Include="AWSSDK.S3" Version="3.5.8.4" />
  <PackageReference Include="AWSSDK.SecretsManager" Version="3.5.0.69" />
  <PackageReference Include="Kralizek.Extensions.Configuration.AWSSecretsManager" Version="1.5.0" />
</ItemGroup>

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:7
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Kralizekcommented, Dec 20, 2022

Hi @Kralizek , thanks for your work. Regarding the sourcecode on github AWSSDK.SecretsManager 3.7.XX is used. But on nuget.org AWSSDK.SecretsManager 3.3.X is used, is it possible to make an update on nuget.org ?

Regards

I’m waiting for a couple more PRs to be merged before releasing a new version.

0reactions
crowz4kcommented, Jul 11, 2023

Thank you! No no, no worries, I was just wondering.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to use a newer version of the aws-sdk than ...
Yes, you simply need to bundle the latest version of the SDK in your Lambda function's deployment file, instead of relying on the...
Read more >
Developing with Amazon S3 using the AWS SDKs, and ...
You can use the AWS SDKs when developing applications with Amazon S3. The AWS SDKs simplify your programming tasks by wrapping the underlying...
Read more >
What's different between the AWS SDK for Java 1.x and 2.x
This section describes the main changes to be aware of when converting an application from using the AWS SDK for Java version 1.x...
Read more >
File: README — AWS SDK for JavaScript
AWS SDK for JavaScript v3 is the latest and recommended version, which has been GA since December 2020. Here is why and how...
Read more >
Use the SDK with Apache Maven - AWS SDK for Java 1.x
To view the latest version of the AWS SDK for Java BOM that is available on Maven Central, visit: https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found