question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Take AWS options from appsettings

See original GitHub issue

This is a nice little library, but one issue that I’m having is that it doesnt take AWS options from appsettings. What are your thoughts on supporting this?

For example, if I have the following in my appsettings file, I’d want this information to be used when creating the Secrets Manager client:

{
    "AWS": {
        "Region": "eu-west-1",
        "Profile": "dev",
    }
}

At the moment, it only seems to use the information in the credentials file, or if the AWS_PROFILE or AWS_REGION environment variable are present, it’ll use the information from there.

The AWS .NET Configuration Extension for Systems Manager has an AddSystemsManager method which builds the IConfigurationBuilder and fetches the AWSOptions from it by IConfiguration.GetAWSOptions(), which allows these options to come from appsettings. I’m wondering if it would be possible to support something similar in this library.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Kralizekcommented, Sep 16, 2021

@devklick thanks for your effort. Usually when I have to test stuff that uses Microsoft.Extensions.Configuration and Microsoft.Extensions.DependencyInjection I end up using the concrete types rather than mocking the interfaces. I am aware it pushes towards integration tests but I prefer that to having complicated but “pure” unit tests.

When it comes to Configuration, I rely on the in-memory provider or the AddObject library I have here.

As for your work in progress, would you mind pushing your branch as a draft PR?

1reaction
kpenergycommented, Sep 9, 2021

Yeah sorry for confusion, personal and work account 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using AWSSDK.Extensions.NETCore.Setup
To use the Configuration object to get the AWS options, first add the AWSSDK. ... Notice that one of the files added to...
Read more >
How to set credentials on AWS SDK on NET Core?
I'm new to AWS SDK and I'm trying to follow the AWS documentation, but gives little to none on what exactly I need...
Read more >
ASP.NET Core appsettings.json Runtime Loading From ...
Loading new values in the ASP.NET Core app using AWS Systems Manager Parameter Store — A Step by Step Guide. The first step...
Read more >
Configuring the AWS SDK for .NET with .NET Core
Go to your appsettings.Development.json file, and provide your local AWS profile information there in the below format. { "AWS": ...
Read more >
Configuring AWS Credentials for .NET Applications
We will walk through various ways to secure the AWS Credentials by using app settings, environment variables, AWS CLI profiles, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found