Skip to content

Commit 34eb12a

Browse files
committed
resolves #29
1 parent 15c4536 commit 34eb12a

File tree

1 file changed

+24
-60
lines changed

1 file changed

+24
-60
lines changed

README.md

Lines changed: 24 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
![Nuget](https://img.shields.io/nuget/dt/LocalStack.Client) [![NuGet](https://img.shields.io/nuget/v/LocalStack.Client.svg)](https://www.nuget.org/packages/LocalStack.Client/) [![Space Metric](https://localstack-dotnet.testspace.com/spaces/232580/badge?token=bc6aa170f4388c662b791244948f6d2b14f16983)](https://localstack-dotnet.testspace.com/spaces/232580?utm_campaign=metric&utm_medium=referral&utm_source=badge "Test Cases")
2-
3-
# LocalStack .Net Core and .Net Framework Client
1+
# LocalStack .NET Client ![Nuget](https://img.shields.io/nuget/dt/LocalStack.Client) [![NuGet](https://img.shields.io/nuget/v/LocalStack.Client.svg)](https://www.nuget.org/packages/LocalStack.Client/) [![Space Metric](https://localstack-dotnet.testspace.com/spaces/232580/badge?token=bc6aa170f4388c662b791244948f6d2b14f16983)](https://localstack-dotnet.testspace.com/spaces/232580?utm_campaign=metric&utm_medium=referral&utm_source=badge "Test Cases")
42

53
![LocalStack](https://github.com/localstack-dotnet/localstack-dotnet-client/blob/master/assets/localstack-dotnet.png?raw=true)
64

@@ -9,32 +7,28 @@ The client library provides a thin wrapper around [aws-sdk-net](https://github.c
97
automatically configures the target endpoints to use LocalStack for your local cloud
108
application development.
119

12-
## Continuous integration
10+
| Package | Stable | Nightly |
11+
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
12+
| LocalStack.Client | [![NuGet](https://img.shields.io/nuget/v/LocalStack.Client.svg)](https://www.nuget.org/packages/LocalStack.Client/) | [![MyGet](https://img.shields.io/myget/localstack-dotnet-client/v/LocalStack.Client.svg?label=myget)](https://www.myget.org/feed/localstack-dotnet-client/package/nuget/LocalStack.Client) |
13+
| LocalStack.Client.Extensions | [![NuGet](https://img.shields.io/nuget/v/LocalStack.Client.Extensions.svg)](https://www.nuget.org/packages/LocalStack.Client.Extensions/) | [![MyGet](https://img.shields.io/myget/localstack-dotnet-client/v/LocalStack.Client.Extensions.svg?label=myget)](https://www.myget.org/feed/localstack-dotnet-client/package/nuget/LocalStack.Client.Extensions) |
14+
15+
## Continuous Integration
1316

1417
| Build server | Platform | Build status |
1518
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1619
| Github Actions | Ubuntu | [![build-ubuntu](https://github.com/localstack-dotnet/localstack-dotnet-client/actions/workflows/build-ubuntu.yml/badge.svg)](https://github.com/localstack-dotnet/localstack-dotnet-client/actions/workflows/build-ubuntu.yml) |
1720
| Github Actions | Windows | [![build-windows](https://github.com/localstack-dotnet/localstack-dotnet-client/actions/workflows/build-windows.yml/badge.svg)](https://github.com/localstack-dotnet/localstack-dotnet-client/actions/workflows/build-windows.yml) |
1821
| Github Actions | macOS | [![build-macos](https://github.com/localstack-dotnet/localstack-dotnet-client/actions/workflows/build-macos.yml/badge.svg)](https://github.com/localstack-dotnet/localstack-dotnet-client/actions/workflows/build-macos.yml) |
1922

20-
## Packages
21-
22-
| Package | Stable | Nightly |
23-
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24-
| LocalStack.Client | [![NuGet](https://img.shields.io/nuget/v/LocalStack.Client.svg)](https://www.nuget.org/packages/LocalStack.Client/) | [![MyGet](https://img.shields.io/myget/localstack-dotnet-client/v/LocalStack.Client.svg?label=myget)](https://www.myget.org/feed/localstack-dotnet-client/package/nuget/LocalStack.Client) |
25-
| LocalStack.Client.Extensions | [![NuGet](https://img.shields.io/nuget/v/LocalStack.Client.Extensions.svg)](https://www.nuget.org/packages/LocalStack.Client.Extensions/) | [![MyGet](https://img.shields.io/myget/localstack-dotnet-client/v/LocalStack.Client.Extensions.svg?label=myget)](https://www.myget.org/feed/localstack-dotnet-client/package/nuget/LocalStack.Client.Extensions) |
26-
2723
## Table of Contents
2824

2925
1. [Supported Platforms](#supported-platforms)
3026
2. [Why LocalStack.NET Client?](#why-localstacknet-client)
3127
3. [Prerequisites](#prerequisites)
32-
4. [Installation](#installation)
33-
- [Recommended: LocalStack.Client.Extensions](#recommended-localstackclientextensions)
34-
- [Base Library: LocalStack.Client](#base-library-localstackclient)
35-
5. [Usage](#usage)
28+
4. [Getting Started](#getting-started)
3629
- [Configuration](#configuration)
3730
- [Integrating with Dependency Injection](#integrating-with-dependency-injection)
31+
5. [Known Issues](#known-issues)
3832
6. [Developing](#developing)
3933
- [Building the Project](#building-the-project)
4034
- [Sandbox Applications](#sandbox-applications)
@@ -67,45 +61,16 @@ To utilize this library, you need to have LocalStack running. While LocalStack c
6761

6862
For detailed installation and setup instructions, please refer to the [official LocalStack installation guide](https://docs.localstack.cloud/getting-started/installation/).
6963

70-
## Installation
71-
72-
### Recommended: LocalStack.Client.Extensions
73-
74-
[`LocalStack.Client.Extensions`](https://www.nuget.org/packages/LocalStack.Client.Extensions) is the recommended package for most modern .NET environments. It integrates with .NET [configuration](https://learn.microsoft.com/en-us/dotnet/core/extensions/configuration) and [dependency injection](https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection) frameworks and provides a wrapper around [`AWSSDK.Extensions.NETCore.Setup`](https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-netcore.html). This allows you to use both LocalStack and AWS side-by-side seamlessly.
75-
76-
This approach is especially recommended for projects using .NET Core, .NET 6, or .NET 7 etc., given the popularity and best practices associated with `AWSSDK.Extensions.NETCore.Setup`.
64+
## Getting Started
7765

78-
To install, use `nuget`:
66+
LocalStack.NET is installed from NuGet. To work with LocalStack in your .NET applications, you'll need the main library and its extensions. Here's how you can install them:
7967

80-
```
81-
Install-Package LocalStack.Client.Extensions
82-
```
83-
84-
Or use `dotnet cli`
85-
86-
```
87-
dotnet add package LocalStack.Client.Extensions
88-
```
89-
90-
**Note**: Installing `LocalStack.Client.Extensions` will also install the base `LocalStack.Client` library.
91-
92-
### Base Library: LocalStack.Client
93-
94-
For specific scenarios, such as using the legacy .NET Framework, or employing a different DI framework like Autofac, or using the library standalone without DI, you might opt for the base [`LocalStack.Client`](https://www.nuget.org/packages/LocalStack.Client) library.
95-
96-
To install, use `nuget`:
97-
98-
```
99-
Install-Package LocalStack.Client
100-
```
101-
102-
Or use `dotnet cli`
103-
104-
```
68+
```bash
10569
dotnet add package LocalStack.Client
70+
dotnet add package LocalStack.Client.Extensions
10671
```
10772

108-
## Usage
73+
Refer to [documentation](https://github.com/localstack-dotnet/localstack-dotnet-client/wiki/Getting-Started#installation) for more information on how to install LocalStack.NET.
10974

11075
`LocalStack.NET` is a library that provides a wrapper around the [aws-sdk-net](https://github.com/aws/aws-sdk-net). This means you can use it in a similar way to the `AWS SDK for .NET` and to [AWSSDK.Extensions.NETCore.Setup](https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/net-dg-config-netcore.html) with a few differences. For more on how to use the AWS SDK for .NET, see [Getting Started with the AWS SDK for .NET](https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-setup.html).
11176

@@ -140,7 +105,7 @@ To configure LocalStack.NET, you can use entries in the appsettings.json files.
140105
}
141106
```
142107

143-
The `RegionName` is important as LocalStack creates resources based on the specified region. For more advanced configurations and understanding how LocalStack.NET operates with LocalStack, refer to the upcoming detailed documentation.
108+
The `RegionName` is important as LocalStack creates resources based on the specified region. For more advanced configurations and understanding how LocalStack.NET operates with LocalStack, refer to documentation.
144109

145110
### Integrating with Dependency Injection
146111

@@ -165,14 +130,18 @@ The `AddLocalStack` method integrates LocalStack.NET into your application, and
165130

166131
`AddLocalStack` extension method is responsible for both configurations and adding of `LocalStack.Client` dependencies to service collection.
167132

168-
For services where the `RegionEndpoint` is not applicable, such as AWS MediaStore or IoT, you can use the `useServiceUrl` parameter:
133+
## Known Issues
169134

170-
```csharp
171-
services.AddAwsService<IAmazonMediaStoreData>(useServiceUrl: true);
172-
services.AddAwsService<IAmazonIoTJobsDataPlane>(useServiceUrl: true);
135+
- **LocalStack Versions v2.0.1 - v2.2:** In versions v2.0.1 through v2.2 of LocalStack, the URL routing logic was changed, causing issues with SQS and S3 operations. Two issues were opened in LocalStack regarding this: [issue #8928](https://github.com/localstack/localstack/issues/8928) and [issue #8924](https://github.com/localstack/localstack/issues/8924). LocalStack addressed this problem with [PR #8962](https://github.com/localstack/localstack/pull/8962). Therefore, when using LocalStack.NET, either use version v2.0 of LocalStack (there are no issues with the v1 series as well) or the upcoming v2.3 version, or use the latest container from Docker Hub.
136+
137+
- **AWS_SERVICE_URL Environment Variable:** Unexpected behaviors might occur in LocalStack.NET when the `AWS_SERVICE_URL` environment variable is set. This environment variable is typically set by LocalStack in the container when using AWS Lambda, and AWS also uses this environment variable in the live environment. Soon, just like in LocalStack's official Python library, this environment variable will be prioritized by LocalStack.NET when configuring the LocalStack host, and there will be a general simplification in the configuration. You can follow this in the issues [issue #27](https://github.com/localstack-dotnet/localstack-dotnet-client/issues/27) and [issue #32](https://github.com/localstack-dotnet/localstack-dotnet-client/issues/32). You set the `AWS_SERVICE_URL` to empty string until this issue is resolved.
173138

139+
```csharp
140+
Environment.SetEnvironmentVariable("AWS_SERVICE_URL", string.Empty);
174141
```
175142

143+
- **IAmazonLambda Operations:** There's a general issue with `IAmazonLambda` operations. This matter is currently under investigation.
144+
176145
## Developing
177146

178147
We appreciate contributions in the form of feedback, bug reports, and pull requests.
@@ -195,12 +164,7 @@ Linux
195164

196165
### Sandbox Applications
197166

198-
The LocalStack .NET repository includes several sandbox console applications located in [tests/sandboxes](https://github.com/localstack-dotnet/localstack-dotnet-client/tree/master/tests/sandboxes)
199-
. These applications serve both as testing tools and as examples.
200-
201-
These sandbox applications showcase various initialization methods for `LocalStack.Client` and `LocalStack.Client.Extensions` (refer to the [Usage](#usage)) and demonstrate common AWS applications. If you're looking to contribute or experiment with the library, these sandbox applications provide a safe environment to do so.
202-
203-
To interact with a LocalStack container, use the [LocalStack.Container](https://github.com/localstack-dotnet/localstack-dotnet-client/tree/master/tests/sandboxes/LocalStack.Container) console application. This application leverages [testcontainers-dotnet](https://github.com/testcontainers/testcontainers-dotnets) to initialize LocalStack. Start the LocalStack.Container application first, then run any of the sandbox applications to experiment.
167+
The LocalStack .NET repository includes several sandbox console applications located in [tests/sandboxes](https://github.com/localstack-dotnet/localstack-dotnet-client/tree/master/tests/sandboxes). These applications serve both as testing tools and as examples.
204168

205169
### Running Tests
206170

0 commit comments

Comments
 (0)