aws / aws/aws-tools-for-powershell
Invoke API Gateway with IAM Auth request signing
- Dominant language
- C#
- Stars
- 298
- Forks
- 102
- Avg merge
- 7d 17m
- Merged PRs (30d)
- 2
Description
I'd like a way to call a API Gateway method/resource that has IAM Auth enabled. This requires signing the request in the [AWS Signature V4](https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html) process, which is very cumbersome.
[This ](https://stackoverflow.com/questions/37217532/is-there-a-net-library-that-can-sign-a-request-with-aws-v4-signature) similar request for a .NET method looks unfulfilled.
## Describe the Feature
API Gateway is a great solution for all REST clients, including PowerShell `Invoke-RestMethod`. However if we'd like to enable AWS_IAM auth on a method/resource, I'm not aware of a realistic way to use PowerShell as a client.
### Is your Feature Request related to a problem?
No
## Proposed Solution
I see two directions we could go.
1. An AWS-service-agnostic cmdlet that, given all the required inputs (credentials, URL, etc), and will return a hashtable of headers to use in, for example, `Invoke-RestMethod`.
2. An API Gateway specific cmdlet that is nearly identical to `Invoke-RestMethod`, but accepts AWS credentials/profile/etc and will do the signing for you. `Invoke-AG2RestMethod`?
### Describe alternatives you've considered
I've spent a few hours trying to write my own signer method, but it is, as previously mentioned, very cumbersome.
## Additional Context
API Gateway and Lambda are incredibly useful for providing simple REST interfaces. IAM auth is something already widely adopted for AWS reasons, and thus is the most convenient authorizer without having to get into Cognito, auth tokens, or other methods.
This is a :rocket: Feature Request
Contributor guide
Research direction
The issue names PowerShell Invoke-RestMethod, AWS Signature Version 4, API Gateway, and the proposed Invoke-AG2RestMethod entry point, but no repository files or tests. Start by locating the existing PowerShell request invocation and credential-handling paths. Done would require an agreed design and verified support for signing IAM-authenticated API Gateway requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, powershell
- Domain
- api, cloud, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100