Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Doc for invoking API Gateway with temp creds #36

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/)