Amplify hit CORS issue

0

I am stuck in tutorial module 5 https://aws.amazon.com/getting-started/hands-on/build-web-app-s3-lambda-api-gateway-dynamodb/module-five/

i have enabled the CORS setup as per screenshot below, tick both OPTION, POST and hit save. Then redeploy the API.

But when i reload the screen, they remained unticked. I ain't sure if it's the reason Enter image description here

1 Answer
1

Hello.

Make sure that the OPTIONS method is present and configured correctly to respond with the necessary CORS headers:

Access-Control-Allow-Origin: '*'
Access-Control-Allow-Methods: 'GET,PUT,POST,DELETE,OPTIONS'
Access-Control-Allow-Headers: 'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token'

**Your Desired Method (POST, GET, etc.): **Ensure that your method (GET, POST, etc.) is also configured to include the CORS headers in the method response and integration response:


Access-Control-Allow-Origin: '*'

Regards, Andrii

profile picture
EXPERT
answered 8 months ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions