Skip to content

ronenfe/Addons.AwsSdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Addons.AwsSdk

This package provides tools that are missing from the official AWS SDK for .NET.


CloudFormationClient

The official AmazonCloudFormationClient only allows you to return pages of export names. This means you have to repeatedly call ListExportsAsync until you find the export you want.

CloudFormationClient simplifies this by letting you query an export by name directly. If the export exists, it returns the value; if not, it throws an exception.

Features

  • Get a CloudFormation export value by name.
  • Automatically handles paging through exports.
  • Returns a clear exception if the export name does not exist.

Usage

using AwsSdkAddons;
using System;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        string accessKey = "YOUR_ACCESS_KEY";
        string secretKey = "YOUR_SECRET_KEY";
        string regionName = "us-east-1";
        string exportName = "MyExportName";

        var client = new CloudFormationClient(accessKey, secretKey, regionName);

        try
        {
            string value = await client.GetExportValueByExportNameAsync(exportName);
            Console.WriteLine($"Export Value: {value}");
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error: {ex.Message}");
        }
    }
}

NuGet

Install the package from NuGet:

https://www.nuget.org/packages/Addons.AwsSdk


Notes

  • Compatible with .NET Framework 4.8 and .NET Core 3.1+.
  • Simplifies working with CloudFormation exports in C#.
  • Ideal for developers who need a quick way to find an export value without manual paging.

About

Tools that are missing from the official AWSSDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages