API Gateway Request Signer
Sign requests to IAM authorized API Gateway APIs
First, create an instance of the client
Now, when you want to make a call to the api, create a signed request
Finally you're ready to actually make the request.
Making Requests with Exponential Backoff
ApiGatewaySigner has a convenience method called
Simply provide it with the same parameters as
signRequest and a callback and it
will take care of automatically retrying requests.
The method calls your callback with the signed request. If the callback throws an exception, then it is called again after a short delay.
The last parameter is optional, and it determines the number of times to retry
the request. By default it's set to
To sign your request the library requires a set of credentials. You can provide these credentials as part of the initial config, or in environment variables.
You can specify the credentials to sign requests with by passing them into the
constructor using the
If values aren't provided in the constructor, the values of the
AWS_SESSION_TOKEN environment variables will be
used. These values will be populated by default in a lambda runtime environment.
See Lambda Environment Variables for more information.