Soenneker.Aws.BasicCredentials
4.0.363
Prefix Reserved
dotnet add package Soenneker.Aws.BasicCredentials --version 4.0.363
NuGet\Install-Package Soenneker.Aws.BasicCredentials -Version 4.0.363
<PackageReference Include="Soenneker.Aws.BasicCredentials" Version="4.0.363" />
<PackageVersion Include="Soenneker.Aws.BasicCredentials" Version="4.0.363" />
<PackageReference Include="Soenneker.Aws.BasicCredentials" />
paket add Soenneker.Aws.BasicCredentials --version 4.0.363
#r "nuget: Soenneker.Aws.BasicCredentials, 4.0.363"
#:package Soenneker.Aws.BasicCredentials@4.0.363
#addin nuget:?package=Soenneker.Aws.BasicCredentials&version=4.0.363
#tool nuget:?package=Soenneker.Aws.BasicCredentials&version=4.0.363
Soenneker.Aws.BasicCredentials
Creates and caches the AWS SDK's BasicAWSCredentials from application configuration.
Installation
dotnet add package Soenneker.Aws.BasicCredentials
Configuration
The utility requires these keys:
{
"Aws": {
"AccessKey": "access-key-id",
"SecretKey": "secret-access-key"
}
}
Use a secret provider or environment variables (Aws__AccessKey and Aws__SecretKey) in deployed applications. Do not commit credentials to configuration files.
Registration and use
using Amazon.Runtime;
using Soenneker.Aws.BasicCredentials.Abstract;
using Soenneker.Aws.BasicCredentials.Registrars;
builder.Services.AddBasicAwsCredentialsUtilAsSingleton();
public sealed class AwsClientFactory(IBasicAwsCredentialsUtil credentialsUtil)
{
public async ValueTask<BasicAWSCredentials> GetCredentials(
CancellationToken cancellationToken) =>
await credentialsUtil.Get(cancellationToken);
}
GetSync() is available for callers that cannot use the asynchronous API.
Lifecycle and security
- Credentials are created on first access and reused for the utility's lifetime.
- Configuration changes and rotated keys are not picked up after initialization; replace or dispose the utility to create a new credential object.
- Missing configuration fails credential creation rather than returning blank credentials.
BasicAWSCredentialsrepresents long-lived access keys. Prefer an AWS role or temporary credential provider when the hosting environment supports one.- Let the DI container dispose registered instances. Do not log the credential object or its secret values.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AWSSDK.Core (>= 4.0.102.11)
- Soenneker.Extensions.Configuration (>= 4.0.910)
- Soenneker.Utils.AsyncSingleton (>= 4.0.881)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.Aws.BasicCredentials:
| Package | Downloads |
|---|---|
|
Soenneker.Aws.Route53.DomainsClientUtil
A .NET thread-safe singleton For AWS's Route53 domain client, AmazonRoute53DomainsClient |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.363 | 77 | 10/15/2026 |
| 4.0.362 | 59 | 10/15/2026 |
| 4.0.361 | 59 | 10/15/2026 |
| 4.0.360 | 64 | 10/14/2026 |
| 4.0.359 | 104 | 10/14/2026 |
| 4.0.358 | 102 | 10/14/2026 |
| 4.0.357 | 72 | 10/14/2026 |
| 4.0.356 | 68 | 10/14/2026 |
| 4.0.355 | 77 | 10/14/2026 |
| 4.0.349 | 109 | 10/13/2026 |
| 4.0.348 | 71 | 10/13/2026 |
| 4.0.347 | 80 | 10/12/2026 |
| 4.0.345 | 122 | 10/12/2026 |
| 4.0.344 | 86 | 10/12/2026 |
| 4.0.343 | 133 | 10/12/2026 |
| 4.0.342 | 88 | 10/11/2026 |
| 4.0.341 | 81 | 10/11/2026 |
| 4.0.340 | 84 | 10/11/2026 |
| 4.0.339 | 718 | 10/9/2026 |
| 4.0.338 | 366 | 10/9/2026 |
Updated NuGet packages