1.9.0
github-actions
released this
11 Mar 09:50
·
233 commits
to refs/heads/develop
since this release
Summary
With this release, we add feature to existing Parameters to retrieve values from AWS AppConfig.
using AWS.Lambda.Powertools.Parameters;
using AWS.Lambda.Powertools.Parameters.AppConfig;
public class Function
{
public async Task<APIGatewayProxyResponse> FunctionHandler
(APIGatewayProxyRequest apigProxyEvent, ILambdaContext context)
{
// Get AppConfig Provider instance
IAppConfigProvider appConfigProvider = ParametersManager.AppConfigProvider
.DefaultApplication("MyApplicationId")
.DefaultEnvironment("MyEnvironmentId")
.DefaultConfigProfile("MyConfigProfileId");
// Retrieve a single configuration, latest version
IDictionary<string, string?> value = await appConfigProvider
.GetAsync()
.ConfigureAwait(false);
//Working with feature flags
// Check if feature flag is enabled
var isFeatureFlagEnabled = await appConfigProvider
.IsFeatureFlagEnabledAsync("MyFeatureFlag")
.ConfigureAwait(false);
if (isFeatureFlagEnabled)
{
// Retrieve an attribute value of the feature flag
var strAttValue = await appConfigProvider
.GetFeatureFlagAttributeValueAsync<string>("MyFeatureFlag", "StringAttribute")
.ConfigureAwait(false);
// Retrieve another attribute value of the feature flag
var numberAttValue = await appConfigProvider
.GetFeatureFlagAttributeValueAsync<int>("MyFeatureFlag", "NumberAttribute")
.ConfigureAwait(false);
}
}
}
Changes
🌟New features and non-breaking changes
AWS.Lambda.Powertools.Logging - 1.5.1
AWS.Lambda.Powertools.Metrics - 1.6.1
AWS.Lambda.Powertools.Tracing - 1.4.1
AWS.Lambda.Powertools.Parameters - 1.3.0
AWS.Lambda.Powertools.Idempotency - 1.1.1
AWS.Lambda.Powertools.BatchProcessing - 1.1.1
📜 Documentation updates
🔧 Maintenance
- chore: Update nuget examples (#565) by @hjgraca
- chore: update package versions for examples (#564) by @hjgraca
- chore: Update version for release 1.9.0 (#563) by @amirkaws
- chore: Update NuGet packages to the latest (#561) by @amirkaws
- chore: Update examples to latest release (#555) by @hjgraca