This is a request interceptor for the Axios HTTP request library to allow requests to be signed with an AWSv4 signature.
This may be useful for accessing AWS services protected with IAM auth such as an API Gateway.
To add an interceptor to the default Axios client:
;;;axios.interceptors.request.useinterceptor;// Requests made using Axios will now be signedaxios.get"".then;
Or you can add the interceptor to a specific instance of an Axios client:
;;;;client.interceptors.request.useinterceptor;// Requests made using Axios will now be signedclient.get"".then;
You can also pass AWS credentials in explicitly (otherwise taken from process.env)