You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -129,7 +130,7 @@ You can configure `LocalStack.Client` by using entries in the `appsettings.json`
129
130
"AwsAccessKeyId": "my-AwsAccessKeyId",
130
131
"AwsAccessKey": "my-AwsAccessKey",
131
132
"AwsSessionToken": "my-AwsSessionToken",
132
-
"RegionName": null// can be values like "eu-central-1", "us-east-1", "us-west-1" etc.
133
+
"RegionName": "eu-central-1"
133
134
},
134
135
"Config": {
135
136
"LocalStackHost": "localhost",
@@ -145,9 +146,7 @@ So the above entries do not need to be specified.
145
146
146
147
What is entered for the aws credential values in the `Session` section does not matter for LocalStack.
147
148
148
-
`RegionName` is important since LocalStack creates resources by spesified region (LocalStack has full multi-region support after `v0.12.17`). By default `RegionName` is `null`. If no value is entered in the `RegionName` entry, the [AWSSDK.NET](https://aws.amazon.com/sdk-for-net/) will use the `us-east-1` region by default.
149
-
150
-
<i><b>Internally depends on whether you set `RegionName` or not, the values of [ServiceUrl](https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs#L202) ve [RegionEndpoint](https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs#L144) properties of the [ClientConfig](https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs) will change. [RegionEndpoint](https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs#L144) and [ServiceUrl](https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs#L202) are mutually exclusive properties. Whichever property is set last will cause the other to automatically be reset to null. If a value set to `RegionName` entry, the LocalStack.NET AWS will set RegionEndpoint property of the ClientConfig. Because of LocalStack.NET sets the RegionEndpoint property after the ServiceUrl property, ServiceUrl will be set to null.</b></i>
149
+
<aname="session-regioname"></a>`RegionName` is important since LocalStack creates resources by spesified region.
151
150
152
151
`Config` section contains important entries for local development. Starting with LocalStack releases after `v0.11.5`, all services are now exposed via the edge service (port 4566) only! If you are using a version of LocalStack lower than v0.11.5, you should set `UseLegacyPorts` to `true`. Edge port can be set to any available port ([see LocalStack configuration section](https://github.com/localstack/localstack#configurations)). If you have made such a change in LocalStack's configuration, be sure to set the same port value to `EdgePort` in the `Config` section. For `LocalStackHost` and `UseSsl` entries, corresponding to the [LocalStack configuration](https://github.com/localstack/localstack#configurations) should be used.
153
152
@@ -190,6 +189,28 @@ It is named as `AddAwsService` to avoid name conflict with `AddAWSService`.
190
189
191
190
<e><b>(Alternatively, `AddAWSServiceLocalStack` method can be used to prevent mix-up with `AddAWSService`.)</b><e>
LocalStack.NET uses [ClientConfig](https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs) to configure AWS clients to connect LocalStack. `ClientConfig` has two properties called `ServiceUrl` and `RegionEndpoint`, these are mutually exclusive properties. Whichever property is set last will cause the other to automatically be reset to null. LocalStack.NET has given priority to the RegionEndpoint property and the `us-east-1` region is used as the default value (Different regions can be set by using appsettings.json, see [RegionName](#session-regioname) entry. Because of it sets the RegionEndpoint property after the ServiceUrl property, ServiceUrl will be set to null.
195
+
196
+
To override this behavior, the `useServiceUrl` optional parameter can be set to `true` as below.
The `RegionEndpoint` is not applicable for services such as AWS MediaStore, Iot. The optional parameter `useServiceUrl` can be useful for use in such scenarios.
LocalStack.NET uses [ClientConfig](https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/ClientConfig.cs) to configure AWS clients to connect LocalStack. `ClientConfig` has two properties called `ServiceUrl` and `RegionEndpoint`, these are mutually exclusive properties. Whichever property is set last will cause the other to automatically be reset to null. LocalStack.NET has given priority to the RegionEndpoint property and the `us-east-1` region is used as the default value (Different regions can be set by using appsettings.json, see [RegionName](#session-regioname) entry. Because of it sets the RegionEndpoint property after the ServiceUrl property, ServiceUrl will be set to null.
257
+
258
+
To override this behavior, the `useServiceUrl` optional parameter can be set to `true` as below.
The `RegionEndpoint` is not applicable for services such as AWS MediaStore, Iot. The optional parameter `useServiceUrl` can be useful for use in such scenarios.
273
+
274
+
`CreateClientByInterface<TSerice>` method can also be used to create AWS service, as follows
-`useServiceUrl` parameter added to change client connection behavior. See [useServiceUrl Parameter](#useserviceurl)
452
+
- Readme and SourceLink added to Nuget packages
453
+
#### 3. Bug Fixes
454
+
- Session::RegionName configuration does not honor while creating AWS client ([#15](https://github.com/localstack-dotnet/localstack-dotnet-client/issues/15))
455
+
456
+
Thanks to [petertownsend](https://github.com/petertownsend) for his contribution
0 commit comments