![]() |
VOOZH | about |
dotnet add package AwsUtil --version 2.2.9
NuGet\Install-Package AwsUtil -Version 2.2.9
<PackageReference Include="AwsUtil" Version="2.2.9" />
<PackageVersion Include="AwsUtil" Version="2.2.9" />Directory.Packages.props
<PackageReference Include="AwsUtil" />Project file
paket add AwsUtil --version 2.2.9
#r "nuget: AwsUtil, 2.2.9"
#:package AwsUtil@2.2.9
#addin nuget:?package=AwsUtil&version=2.2.9Install as a Cake Addin
#tool nuget:?package=AwsUtil&version=2.2.9Install as a Cake Tool
A comprehensive C# utility library wrapping 133 AWS services with cached clients, structured exceptions, placeholder resolution, and multi-service orchestration — the .NET port of aws-util.
👁 CI
👁 NuGet Version
👁 NuGet Downloads
👁 License: MIT
👁 .NET
async Task<T> and synchronous overloads${ssm:/path} and ${secret:name:key} references resolved from SSM Parameter Store and Secrets Managerdotnet add package AwsUtil
using AwsUtil;
using AwsUtil.Services;
// S3 operations
await S3Service.UploadFileAsync("my-bucket", "data/file.json", "/tmp/file.json");
var bytes = await S3Service.DownloadBytesAsync("my-bucket", "data/file.json");
var url = S3Service.GeneratePresignedUrl("my-bucket", "data/file.json", expiresIn: 3600);
// SQS operations
await SqsService.SendMessageAsync(
"https://sqs.us-east-1.amazonaws.com/123/my-queue", "hello");
var messages = await SqsService.ReceiveMessagesAsync(
"https://sqs.us-east-1.amazonaws.com/123/my-queue");
// DynamoDB operations
await DynamoDbService.PutItemAsync("my-table", item);
var result = await DynamoDbService.GetItemAsync("my-table", key);
// Placeholder resolution (SSM + Secrets Manager)
var dbHost = (string)Placeholder.Retrieve("${ssm:/myapp/db/host}")!;
var dbPass = (string)Placeholder.Retrieve("${secret:myapp/db-credentials:password}")!;
// Batch config loading from SSM + Secrets Manager
var config = await ConfigLoader.LoadAppConfigAsync(
"/myapp/prod/", secretName: "myapp/secrets");
var dbUrl = config.Get("database-url");
// DB credentials from Secrets Manager
var creds = await ConfigLoader.GetDbCredentialsAsync("myapp/db-creds");
All AWS errors are mapped to semantic exception types via ErrorClassifier:
| Exception | Example AWS Error Codes |
|---|---|
AwsThrottlingException |
Throttling, TooManyRequestsException, SlowDown |
AwsNotFoundException |
ResourceNotFoundException, NoSuchKey, NoSuchBucket |
AwsPermissionException |
AccessDenied, UnauthorizedOperation, ExpiredToken |
AwsConflictException |
ConflictException, AlreadyExistsException |
AwsValidationException |
ValidationException, InvalidParameterValue |
AwsTimeoutException |
Operation timeout |
AwsServiceException |
Catch-all for unclassified errors |
try
{
await S3Service.DownloadBytesAsync("my-bucket", "missing-key");
}
catch (AwsNotFoundException ex)
{
Console.WriteLine($"Not found: {ex.ErrorCode}"); // "NoSuchKey"
}
catch (AwsThrottlingException)
{
// Back off and retry
}
catch (AwsUtilException ex)
{
Console.WriteLine($"{ex.GetType().Name}: {ex.Message} [{ex.ErrorCode}]");
}
Resolve AWS references embedded in configuration strings:
// SSM Parameter Store
var host = (string)Placeholder.Retrieve("${ssm:/myapp/db/host}")!;
// Secrets Manager (full secret)
var secret = (string)Placeholder.Retrieve("${secret:myapp/api-key}")!;
// Secrets Manager (JSON key extraction)
var password = (string)Placeholder.Retrieve("${secret:myapp/db-creds:password}")!;
// Async version
var value = await Placeholder.RetrieveAsync("${ssm:/myapp/config}");
// Clear caches
Placeholder.ClearAllCaches();
Core: S3, SQS, DynamoDB, Lambda, SNS, SES (v1 & v2), Parameter Store, Secrets Manager, KMS, STS, IAM, EC2
Compute & Containers: ECS, ECR, EKS, Lambda, Batch, App Runner, Elastic Beanstalk, Lightsail, EMR, EMR Containers, EMR Serverless
Database & Storage: RDS, DynamoDB, ElastiCache, Neptune, Neptune Graph, Keyspaces, MemoryDB, DocumentDB, Redshift, Redshift Data, Redshift Serverless, EFS, FSx, Storage Gateway, Transfer, Timestream Write/Query, RDS Data
Networking & CDN: Route 53, CloudFront, ELBv2, VPC Lattice, Auto Scaling
AI/ML: Bedrock, Bedrock Agent, Bedrock Agent Runtime, SageMaker Runtime, SageMaker Feature Store, Rekognition, Textract, Comprehend, Translate, Polly, Transcribe, Personalize, Forecast, Lex
Analytics: Athena, Glue, Kinesis, Kinesis Firehose, Kinesis Analytics, MSK, QuickSight, DataBrew
Security & Compliance: Security Hub, Inspector, Detective, Macie, Access Analyzer, SSO Admin, Cognito
Management & Governance: CloudWatch, CloudTrail, CloudFormation, EventBridge, Step Functions, Organizations, Service Quotas, Config Service, Health
Developer Tools: CodeBuild, CodeCommit, CodeDeploy, CodePipeline, CodeArtifact, CodeStar Connections
IoT: IoT Core, IoT Data, IoT Greengrass, IoT SiteWise
Media & Communication: MediaConvert, IVS, Connect
Multi-Service Orchestration (30+ patterns): Deployer, Data Pipeline, Security Ops, Blue/Green, Disaster Recovery, Cost Governance, Credential Rotation, Container Ops, ML Pipeline, and more
ClientFactory.GetClient<T>(region?) with LRU caching (TTL 15 min, max 64 clients)ErrorClassifier which maps AWS error codes to typed exceptionsMade with care by Masrik Dahir
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.2.9 | 116 | 4/9/2026 |