DEV Community

Discussion on: How to use AWS Cognito to access AWS Services

Collapse
 
davru profile image
˙˙˙ɹǝʌo ǝɯ dılɟ ʎǝɥ

Nice writeup.
A little unclear on which IDs go where in the .env but I think I've got that sorted.
Now I'm getting a CORS issue on a request:
Access to fetch at 'demo-.../some.jpg?x-id=PutObject' from origin 'localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Collapse
 
davru profile image
˙˙˙ɹǝʌo ǝɯ dılɟ ʎǝɥ

Actually just realized that the var usage assumes the s3 bucket and cognito are in the same region, split them out so I could configure them separately and the upload is working now without error.