AWSSecretsManagerConfigurationExtensions
AWSSecretsManagerConfigurationExtensions copied to clipboard
How to use this library with newer versions of the AWS SDK
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>
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
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.
Hey @Kralizek , I appreciate your work on making an update on this. I was wondering, are there any updates?
Hi @crowz4k , I'm currently on summer vacation. My plan is to spend some time on releasing the newest version sometimes before the end of August, but I can't promise anything. Is there any major issue stopping you?
Thank you! No no, no worries, I was just wondering.
Hi, @Kralizek. Thank you for your work. I'm wondering if you get a chance to update the AWS secrets manager to 3.7.
Hi @lamchowing, right now I don't have loads of time to put on this library. If there is a specific scenario that requires upgrading this library to be built targeting 3.7 rather than leveraging binding redirects as explained in this post, please report an issue.