Anarchy.Toolkit.Bootstrap.Aws
2.0.0
See the version list below for details.
dotnet add package Anarchy.Toolkit.Bootstrap.Aws --version 2.0.0
NuGet\Install-Package Anarchy.Toolkit.Bootstrap.Aws -Version 2.0.0
<PackageReference Include="Anarchy.Toolkit.Bootstrap.Aws" Version="2.0.0" />
<PackageVersion Include="Anarchy.Toolkit.Bootstrap.Aws" Version="2.0.0" />
<PackageReference Include="Anarchy.Toolkit.Bootstrap.Aws" />
paket add Anarchy.Toolkit.Bootstrap.Aws --version 2.0.0
#r "nuget: Anarchy.Toolkit.Bootstrap.Aws, 2.0.0"
#:package Anarchy.Toolkit.Bootstrap.Aws@2.0.0
#addin nuget:?package=Anarchy.Toolkit.Bootstrap.Aws&version=2.0.0
#tool nuget:?package=Anarchy.Toolkit.Bootstrap.Aws&version=2.0.0
Anarchy.Toolkit.Bootstrap.Aws
Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Bootstrap · Package catalog
Opt-in AWS configuration for toolkit applications: AWS settings, KMS secret management, Secrets Manager values, the SSM Parameter Store and the X-Ray trace id context.
dotnet add package Anarchy.Toolkit.Bootstrap.Aws
IAwsAppSettings/AwsSettingsbind theAwssettings section.ModuleAwsSecretManagementdecrypts secrets with AWS KMS in remote environments; pass it toModuleLibConfiguration.WithSecretManagement.IHostEnvironment.GetAwsSecretValuereads AWS Secrets Manager remotely;AddAwsSystemsManagerParameterStoreadds the SSM Parameter Store as a configuration source.AmazonRequestContext/IAmazonRequestContext(ModuleAwsRequestContext) expose the X-Ray trace id of the current request.
When to use it
Use this package only in applications that run on AWS. Anarchy.Toolkit.Bootstrap stays provider-neutral: without this package no AWS SDK is referenced and no remote secret service is registered.
How to use it
services.UseModule(
new ModuleLibConfiguration<ModuleAppSettings, AppSettings>()
.WithSecretManagement(new ModuleAwsSecretManagement()),
configuration, environment);
ModuleAwsSecretsManager registers AWS Secrets Manager as the ISecretManagementService (SecretsManagerSecretService: the value passed to DecryptStringAsync is the secret name or ARN, cached per instance), next to the KMS-based ModuleAwsSecretManagement. Both add their services and AWS clients (IAmazonSecretsManager, IAmazonKeyManagementService, created from the default AWS credential and region chain) with TryAdd: register a client of your own (with a region or a service URL) or another ISecretManagementService before the module and it is kept. ModuleAwsSecretManagement uses the in-memory secret service in local environments.
Register explicit SSM paths in precedence order (later paths override earlier ones):
using Anarchy.Toolkit.Bootstrap.Aws.Extensions.Microsoft.Extensions.Configuration;
builder.Configuration.AddAwsSystemsManagerParameterStore(
builder.Environment,
new[] { "/application/shared", "/application/${env:DEPLOYMENT_STAGE}" },
optional: true,
reloadAfter: TimeSpan.FromMinutes(5));
The explicit-path overload does nothing locally. In remote environments it expands ${env:NAME} from environment
variables; a missing, empty or whitespace value skips that entire path when optional is true, or throws
MissingEnvironmentVariableException otherwise. optional and reloadAfter are passed to each SSM source. It neither
derives a path nor implicitly reads or writes PARAMETER_STORE_CONFIGURATION_PATH. The existing single-prefix overload retains
its original behavior, including that environment variable.
See the package catalog and toolkit overview.
Releases
See the release notes for the complete release history.
| 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
- Amazon.Extensions.Configuration.SystemsManager (>= 7.1.1)
- Anarchy.Toolkit.Bootstrap (>= 2.0.0)
- Anarchy.Toolkit.Core (>= 3.0.0)
- AWSSDK.Core (>= 4.1.1.2)
- AWSSDK.KeyManagementService (>= 4.1.1.1)
- AWSSDK.SecretsManager (>= 4.1.1.2)
- Humanizer (>= 3.0.10)
- Microsoft.Extensions.Caching.Memory (>= 10.0.15)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Configuration.Json (>= 10.0.15)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Diagnostics (>= 10.0.15)
- Microsoft.Extensions.Hosting (>= 10.0.15)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Logging (>= 10.0.15)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.15)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.15)
- Newtonsoft.Json (>= 13.0.4)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Anarchy.Toolkit.Bootstrap.Aws:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Testing.Aws
AWS test helpers: SNS/SQS helpers (typically against Moto), SqsMessageFixture with gzip/zlib bodies, and LambdaContextFixture for Lambda handlers under test. |
|
|
Anarchy.Toolkit.Runtime.Web.Aws
Opt-in AWS Lambda hosting for toolkit REST APIs: AwsWebAppEntryPointBase behind API Gateway, the X-Amzn-Trace-Id middleware (UseAmazonTraceId) and Lambda path helpers. |
|
|
Anarchy.Toolkit.Runtime.Aws
Opt-in AWS Lambda hosting for Jobs and event handlers: LambdaJobEntryPointBase, which carries the X-Ray trace id of each invocation into the toolkit's request context. |
GitHub repositories
This package is not used by any popular GitHub repositories.
## Releases
### 2.0.0
- Add explicit Systems Manager paths and an injectable Secrets Manager service; use registered AWS clients.
- feat(Core)!: Add health and telemetry extension points
- feat(Infrastructure): Add configurable provider and messaging seams
- feat(Bootstrap)!: Classify environments safely and configure AWS secrets
### 1.0.0
- Introduced the package with the AWS implementations extracted from its provider-neutral parent.