Skip to content

Commit

Permalink
Merge pull request #36 from petrulevich-dxs/feature/api-gateway-doc
Browse files Browse the repository at this point in the history
Updated Doc for invoking API Gateway with temp creds
  • Loading branch information
tsibelman authored Aug 30, 2023
2 parents 76ac4d5 + 8c0ba6c commit 32ce5fc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ To do that just fill the configuration in the appsettings.json file and debug or
"json": "{...}"
}
```

# Calling API Gateway with temporary credentials
When calling API Gateway (i.e. service `execute-api`) with temporary credentials, please also include AWS Session Token in request header:
```
request.Headers.TryAddWithoutValidation("X-Amz-Security-Token", "sessionToken");
```

### Calling from a sync method
In case you can't use async calls in your method, you can use this example instead
```csharp
Expand All @@ -47,6 +54,7 @@ In case you can't use async calls in your method, you can use this example inste

var responseStr = response.Content.ReadAsStringAsync().ConfigureAwait(false).GetAwaiter().GetResult();
```
### Nuget Package


### Nuget Package
Aws4RequestSigner is on NuGet: [Aws4RequestSigner](https://www.nuget.org/packages/Aws4RequestSigner/)

0 comments on commit 32ce5fc

Please sign in to comment.