-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Amplify Rest API Next js, Not signing the request with aws credential #13378
Comments
Hello, @AtharvArolkar and thank you for opening this issue. Going to tag a related issue, #13310 here and mark this is a bug that's a version parity difference from v5 and v6 behavior. Would you mind also sharing some context around the use case and why you're looking to pass the |
Hi @cwomack, We are using both the x-api-key and the IAM authorization to authorize the Rest API Gateway request, as our Gateway is configured such that, method request requires the API Key. If API Key is not provided, then the Gateway throws a 403 error response. |
@AtharvArolkar, thank you for the use case. we are currently working on fixing this without breaking customers. I will update the ticket once we have a PR out for the issue. |
Hi @ashika112 , @cwomack , any updates on this issue? |
Opened up a draft PR i will add in tests and get this to review soon. |
Hi @ashika112 , any updates on the PR? |
Hi updated the PR and is in review now. |
Hi @ashika112 @cwomack , Any updates on this? |
HI @AtharvArolkar , the fix is now available in |
Thank You!! @ashika112 . Will try it out. :) |
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
REST API
Amplify Version
v6
Amplify Categories
api
Backend
CDK
Environment information
Describe the bug
Im trying to make a REST API request, when the request is called, I get the following error
IncompleteSignatureException: Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header.
Authorization=eyJraWQiOiJRQU5N............
I checked the network tab, the request headers don't contain the AWS signed request headers.
Following in my code:
This is my configuration file:
But if i make the api call with axios object and manually sign the request, the api call is successfull
Note : fetchAuthSession is configured using the same configuration file, mentioned above
Expected behavior
As per what is mentioned in the docs, AWS Docs the request should be automatically signed with the aws credentials, but it doesn't seem to be happening over here.
Reproduction steps
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: