SmartAwsConsole 1.0.11

dotnet add package SmartAwsConsole --version 1.0.11
                    
NuGet\Install-Package SmartAwsConsole -Version 1.0.11
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SmartAwsConsole" Version="1.0.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SmartAwsConsole" Version="1.0.11" />
                    
Directory.Packages.props
<PackageReference Include="SmartAwsConsole" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SmartAwsConsole --version 1.0.11
                    
#r "nuget: SmartAwsConsole, 1.0.11"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SmartAwsConsole@1.0.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SmartAwsConsole&version=1.0.11
                    
Install as a Cake Addin
#tool nuget:?package=SmartAwsConsole&version=1.0.11
                    
Install as a Cake Tool

🧠 SmartAwsConsole

A Unified AWS S3 Utility Library for .NET

Easily integrate Amazon S3 file operations — including large uploads — into your applications (Windows Service, Web API, or Console) with minimal setup.

SmartAwsConsole abstracts all AWS complexities, letting you pass your own credentials and directly call upload, download, and bucket management operations.


🚀 Features

  • ✅ Easy AWS client creation with your credentials
  • ✅ Upload single and large files (chunked 10MB parts)
  • ✅ List buckets and objects
  • ✅ Download and delete objects
  • ✅ Works in:
    • .NET Console Apps
    • ASP.NET Core APIs
    • Windows Services
  • ✅ Fully async and awaitable API

📦 Installation

dotnet add package SmartAwsConsole

Or via NuGet Package Manager:

Install-Package SmartAwsConsole

⚙️ Configuration

You do not need to hardcode credentials inside the package.
Pass them dynamically from your own configuration (e.g. appsettings.json, environment variables, or Azure KeyVault).

Example appsettings.json:

{
  "AWS": {
    "AccessKey": "YOUR_ACCESS_KEY",
    "SecretKey": "YOUR_SECRET_KEY",
    "Region": "ap-south-1"
  }
}

🧠 Usage Examples

🖥️ Console Application Example

using SmartAwsConsole;

class Program
{
    static async Task Main()
    {
        var s3Client = AwsClientFactory.CreateS3Client("ACCESS_KEY", "SECRET_KEY", "ap-south-1");
        var s3Manager = new S3Manager(s3Client);

        await s3Manager.UploadLargeFileAsync("my-bucket", "uploads/test.zip", @"D:\files\test.zip");

        var files = await s3Manager.ListObjectsAsync("my-bucket");
        Console.WriteLine("Files:");
        files.ForEach(Console.WriteLine);

        await s3Manager.DownloadFileAsync("my-bucket", "uploads/test.zip", @"D:\downloads\test.zip");
    }
}

🧰 ASP.NET Core API Example

using Microsoft.AspNetCore.Mvc;
using SmartAwsConsole;

[ApiController]
[Route("api/[controller]")]
public class S3Controller : ControllerBase
{
    private readonly S3Manager _s3Manager;

    public S3Controller(IConfiguration config)
    {
        var accessKey = config["AWS:AccessKey"];
        var secretKey = config["AWS:SecretKey"];
        var region = config["AWS:Region"];

        var client = AwsClientFactory.CreateS3Client(accessKey, secretKey, region);
        _s3Manager = new S3Manager(client);
    }

    [HttpPost("upload")]
    public async Task<IActionResult> Upload(IFormFile file)
    {
        var path = Path.GetTempFileName();
        using (var stream = new FileStream(path, FileMode.Create))
        {
            await file.CopyToAsync(stream);
        }

        await _s3Manager.UploadLargeFileAsync("my-bucket", file.FileName, path);
        System.IO.File.Delete(path);

        return Ok("File uploaded successfully");
    }
}

⚙️ Windows Service Example

using SmartAwsConsole;
using System.ServiceProcess;

public class SmartAwsUploaderService : ServiceBase
{
    private S3Manager _s3Manager;

    protected override void OnStart(string[] args)
    {
        var s3Client = AwsClientFactory.CreateS3Client("ACCESS_KEY", "SECRET_KEY", "ap-south-1");
        _s3Manager = new S3Manager(s3Client);
        Task.Run(() => MonitorFolderAsync());
    }

    private async Task MonitorFolderAsync()
    {
        string folderPath = @"C:\Uploads";
        foreach (var file in Directory.GetFiles(folderPath))
        {
            await _s3Manager.UploadLargeFileAsync("my-bucket", Path.GetFileName(file), file);
        }
    }
}

🧩 Future Enhancements

  • ✅ EC2 management
  • ✅ DynamoDB operations
  • ✅ CloudWatch logging
  • ✅ IAM role integration
  • ✅ Retry + progress tracking events
  • ✅ Angular + React front-end NPM library (smart-uploader)

📜 License

MIT © 2025 — SmartAwsConsole Contributors

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.11 0 3/2/2026
1.0.2 352 11/7/2025