[Hidden-tech] Problems with AWS API and CORS
Alan Frank
alan at 8wheels.org
Thu Jun 11 20:04:51 UTC 2020
Thanks to everyone who responded. I understand the general idea behind
CORS and am specifically looking for help with my AWS API-Gateway
request, where I believe I have already set things up properly and they
don't work. I turned on logging, but that isn't working right either.
At this point, I am ready to pay somebody who is an AWS expert, if
necessary, though I am guessing that it can be resolved in just a few
minutes.
--Alan
-------- Original Message --------
Subject: Problems with AWS API and CORS
Date: 08.06.2020 10:34
From: Alan Frank <alan at 8wheels.org>
To: hidden-discuss at lists.hidden-tech.net
Hi,
I am a newbie with AWS (learning it via acloudguru.com, where I posted
my question a few days ago and have gotten no responses) and am
running into problems with CORS; specifically, I am getting an error
when my JS code attempts to call my API: "Access to XMLHttpRequest at
'https://<redacted>.execute-api.us-east-1.amazonaws.com/default' from
origin 'https://s3.amazonaws.com' has been blocked by CORS policy: No
'Access-Control-Allow-Origin' header is present on the requested
resource."
There is a huge amount of information out there, but most of it
appears to be either irrelevant or over my head. I did figure out
that I might be able to look at an access log to see what is going on.
I found the instructions on setting this up
(https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html#set-up-access-logging-using-console),
but they tell me to "Sign in to the API Gateway console, select an
API, choose Settings from the primary navigation panel, and enter an
ARN in CloudWatch log role ARN." However, this field does not seem to
exist. I have provided this feedback to AWS, but am not expecting a
timely response.
I'd be grateful for any help.
--Alan
More information about the Hidden-discuss
mailing list