POST https://cognito-identity.eu-west-1.amazonaws.com/ 400 (Bad Request)
See original GitHub issueDo you want to request a feature or report a bug? Bug
What is the current behavior? Iam using AWS Amplify JS library in my Web-Application, the problem is that in each Authentication request or refreshing my browser I used to see “POST https://cognito-identity.eu-west-1.amazonaws.com/ 400 (Bad Request)”.
My understanding is that calling
import aws_exports from './aws-exports';
leads to AWS sending post request using ‘aws_cognito_identity_pool_id’, When I remove
'aws_cognito_identity_pool_id': 'eu-west-1:xxxxxxxxxxx',
from the configuration file I do not see this error message (no more post request).
Do you have any suggestion/idea why such error comes, and why the Aws_Amplify_Api used to post requests every time ‘./aws-exports’ is imported?
Here is my config file:
const awsmobile = {
'aws_cognito_identity_pool_id': 'eu-west-1:xxxxxxx',
'aws_cognito_region': 'eu-west-1',
'aws_facebook_app_id': '34534534534545',
'aws_facebook_app_permissions': 'public_profile,email',
'aws_google_app_permissions': 'email,profile,openid',
'aws_google_web_app_id': '345345345-apps.googleusercontent.com',
'aws_user_files': 'enable',
'aws_user_files_s3_bucket': 'abc',
'aws_user_files_s3_bucket_region': 'eu-west-1',
'aws_project_name': 'abc',
'aws_user_pools': 'enable',
'aws_user_pools_id': 'eu-west-1_xxxxxxx',
'aws_user_pools_web_client_id': 'xxxxxxxxxx',
'aws_user_pools_arn': 'arn:aws:cognito-idp:eu-west-1:55555555:userpool/eu-west-1_xxxxxxx',
'aws_user_pools_mfa_type': 'OFF',
};
export default awsmobile;
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
HTTP 400 status code (Bad Request) - Amazon CloudFront
When the deployment is complete, the distribution's status changes to Deployed, and you should stop receiving the AuthorizationHeaderMalformed error responses.
Read more >AWS Cognito TOKEN Endpoint giving a 400 Bad Request ...
If you have created with secret key option, that must be included in the Authorization header of the request.
Read more >How to get my AWS account working back after 400 bad ...
Log in to post an answer. A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the...
Read more >apex - Getting 400 Bad request on sending request to iam ...
So, I want to know how it is possible that same URL create the user on AWS/iam from postman client and gives bad...
Read more >400 Bad Request - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@engharb the Cognito Federated Identity Pool is used to get an AWS credentials for you. If you provide the identity pool id to the library, it will try to get you a guest credentials when your app is loaded. If your identity pool doesn’t allow unauthenticated access, then you will get this post error.
I solved it this way:
Goto Amazon Cognito > Manage Identity Pool > (Click in your Identity Pool) > Edit identity pool And check: Enable access to unauthenticated identities And save changes