Home > Software engineering >  Reading AWS AppConfig from .NET 6 Lambda Function
Reading AWS AppConfig from .NET 6 Lambda Function

Time:04-13

I've googled around but with no luck... I need to read some configuration values stored inside a AWS Systems Manager -> AppConfig configuration (stored as text, not flag) but I've not found a C# example... I've also tried on the AWS Console to add the layer as specified here but with no success.

For now I've used a SecretManager but it's not the correct place to store the config information... can someone help me? Thanks

CodePudding user response:

Since your question is about C# example for AppConfig, you can take a look on https://github.com/ScottHand/AppConfigNETCoreSample/tree/5f5db8d375e4df92dd7dc1b8a16f42bfb042e645. There is interesting issue with .NET client though that https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_GetConfiguration.html is deprecated in favor of StartConfigurationSession and GetLatestConfiguration, however .NET client do not have yet support for these methods https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/appconfig/AmazonAppConfigAsyncClient.html

Recommended approach is though to go with lambda extension, so you can try to open another question with your problem of setting up the extension.

Alternatively you can use SSM Parameter Store which also might be suitable for your Lambda use case.

  • Related