This package provides tools that are missing from the official AWS SDK for .NET.
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.
- Get a CloudFormation export value by name.
- Automatically handles paging through exports.
- Returns a clear exception if the export name does not exist.
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}");
}
}
}Install the package from NuGet:
https://www.nuget.org/packages/Addons.AwsSdk
- 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.