Skip to content

Commit 9c354cb

Browse files
authored
Updated README.md; added HostBuilder sample (aws#9)
Updated README.md; added HostBuilder sample
1 parent 4c26d69 commit 9c354cb

File tree

2 files changed

+87
-4
lines changed

2 files changed

+87
-4
lines changed

README.md

Lines changed: 87 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,90 @@
1-
## AWS Dotnet Extensions Configuration
1+
![.NET on AWS Banner](./logo.png ".NET on AWS")
22

3-
This repository hosts various libraries that help .NET developers configure ASP.NET Core applications using AWS services. initially, we will release .NET Configuration Extension for AWS SSM. We are planning to add a new library for Secrets Manager.
3+
# AWS .NET Configuration Extension for Systems Manager - In Development
4+
This software is in development and we do not recommend using this software in production environment.
45

5-
## License
6+
Configuration Extension for Systems Manager library simplifies using [AWS SSM](https://aws.amazon.com/systems-manager/)'s [Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html) as a source for configuration information for .NET Core applications. This project was contributed by [@KenHundley](https://github.com/KenHundley).
67

7-
This library is licensed under the Apache 2.0 License.
8+
The library introduces the following dependencies:
9+
10+
* [AWSSDK.Extensions.NETCore.Setup](https://www.nuget.org/packages/AWSSDK.Extensions.NETCore.Setup/)
11+
* [AWSSDK.SimpleSystemsManagement](https://www.nuget.org/packages/AWSSDK.SimpleSystemsManagement/)
12+
* [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration)
13+
14+
# Getting Started
15+
16+
Follow the examples below to see how the library can be integrated into your application. This extension adheres to the same practices and conventions of [Configuration in ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-2.1).
17+
18+
## ASP.NET Core Example
19+
The most common use case for this library is to pull configuration from Parameter Store. You can easily add this functionality by adding 1 line of code:
20+
21+
```csharp
22+
public class Program
23+
{
24+
public static void Main(string[] args)
25+
{
26+
CreateWebHostBuilder(args).Build().Run();
27+
}
28+
29+
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
30+
WebHost.CreateDefaultBuilder(args)
31+
.ConfigureAppConfiguration(builder =>
32+
{
33+
builder.AddSystemsManager("/my-application/");
34+
})
35+
.UseStartup<Startup>();
36+
}
37+
```
38+
39+
## HostBuilder Example
40+
Microsoft introduced [.NET Generic Host](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/generic-host?view=aspnetcore-2.1) to de-couple HTTP pipeline from the Web Host API. The Generic Host library allows you to write non-HTTP services using configuration, dependency injection, and logging features. The sample code below shows you how to use the the AWS .NET Configuration Extension library:
41+
42+
```csharp
43+
namespace HostBuilderExample
44+
{
45+
public static async Task Main(string[] args)
46+
{
47+
var host = new HostBuilder()
48+
.ConfigureAppConfiguration((hostingContext, config) =>
49+
{
50+
config.AddSystemsManager("/my-application/");
51+
})
52+
.ConfigureServices((sc) => { ... })
53+
.Build();
54+
55+
await host.RunAsync();
56+
}
57+
}
58+
```
59+
60+
# Getting Help
61+
62+
You can use the following community resources to get help. We use the [GitHub issues](https://github.com/aws/aws-dotnet-extensions-configuration/issues) for tracking bugs and feature requests and have limited bandwidth to address them.
63+
64+
* Ask a question on [StackOverflow](http://stackoverflow.com/) and tag it with `aws` and `.net`
65+
* Come join the AWS .NET community chat on [gitter](https://gitter.im/aws/aws-sdk-net)
66+
* Open a support ticket with [AWS Support](https://console.aws.amazon.com/support/home)
67+
* If it turns out that you may have found a bug, please open an [issue](https://github.com/aws/aws-dotnet-extensions-configuration/issues/new)
68+
69+
# Contributing
70+
71+
We welcome community contributions and pull requests. See
72+
[CONTRIBUTING](./CONTRIBUTING.md) for information on how to set up a development
73+
environment and submit code.
74+
75+
# Additional Resources
76+
77+
[AWS Developer Center - Explore .NET on AWS](https://aws.amazon.com/developer/language/net/)
78+
Find all the .NET code samples, step-by-step guides, videos, blog content, tools, and information about live events that you need in one place.
79+
80+
[AWS Developer Blog - .NET](https://aws.amazon.com/blogs/developer/category/programing-language/dot-net/)
81+
Come see what .NET developers at AWS are up to! Learn about new .NET software announcements, guides, and how-to's.
82+
83+
[@awsfornet](https://twitter.com/awsfornet)
84+
Follow us on twitter!
85+
86+
# License
87+
88+
Libraries in this repository are licensed under the Apache 2.0 License.
89+
90+
See [LICENSE](./LICENSE) and [NOTICE](./NOTICE) for more information.

logo.png

17.9 KB
Loading

0 commit comments

Comments
 (0)